SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
Loading...
Searching...
No Matches
sensesp::Observable Class Reference

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>

Inheritance diagram for sensesp::Observable:
[legend]

Public Member Functions

 Observable ()
 
 Observable (Observable &&other)
 Move constructor.
 
void notify ()
 
void attach (std::function< void()> observer)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Observable() [1/2]

sensesp::Observable::Observable ( )
inline

Definition at line 18 of file observable.h.

◆ Observable() [2/2]

sensesp::Observable::Observable ( Observable &&  other)

Move constructor.

Definition at line 5 of file observable.cpp.

Member Function Documentation

◆ attach()

void sensesp::Observable::attach ( std::function< void()>  observer)

Definition at line 13 of file observable.cpp.

Here is the caller graph for this function:

◆ notify()

void sensesp::Observable::notify ( )

Definition at line 7 of file observable.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: