SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
observable.h
Go to the documentation of this file.
1#ifndef _observable_H_
2#define _observable_H_
3
4#include <forward_list>
5#include <functional>
6#include <vector>
7
8namespace sensesp {
9
17 public:
19
22
23 void notify();
24 void attach(std::function<void()> observer);
25
26 private:
27 std::forward_list<std::function<void()> > observers;
28};
29
30} // namespace sensesp
31
32#endif
Construct a new transform based on a single function.
A base class which allow observers to attach callbacks to themselves. The callbacks will be called wh...
Definition observable.h:16
void attach(std::function< void()> observer)