|
SensESP 3.4.1-alpha
Universal Signal K sensor toolkit ESP32
|
A base class which allow observers to attach callbacks to themselves. The callbacks will be called when the observable needs to notify the observers about some state change. More...
#include <sensesp/system/observable.h>
Classes | |
| struct | ObserverEntry |
Public Member Functions | |
| Observable () | |
| Observable (Observable &&other) | |
| Move constructor. | |
| void | notify () |
| int | attach (std::function< void()> observer) |
| Attach an observer callback. | |
| void | detach (int id) |
| Remove a previously attached observer by its ID. | |
A base class which allow observers to attach callbacks to themselves. The callbacks will be called when the observable needs to notify the observers about some state change.
Definition at line 16 of file observable.h.
|
inline |
Definition at line 23 of file observable.h.
|
inline |
Move constructor.
Definition at line 26 of file observable.h.
|
inline |
Attach an observer callback.
Definition at line 40 of file observable.h.
|
inline |
Remove a previously attached observer by its ID.
Definition at line 55 of file observable.h.
|
inline |