State changing notifier wrapper. More...
#include <notifier.h>
Public Member Functions | |
Notifier (T &state) | |
Constructor. More... | |
Notifier (const Notifier &)=delete | |
Notifier (Notifier &&)=delete | |
Notifier & | operator= (const Notifier &)=delete |
Notifier & | operator= (Notifier &&)=delete |
T | Read () const noexcept |
Read the current state. More... | |
void | Subscribe (NotificationHandler< T > handler) |
Subscribe to the state change. More... | |
void | Notify () |
Notify state change. More... | |
State changing notifier wrapper.
T | State type |
|
inline |
Constructor.
state | State |
|
inline |
Notify state change.
|
inlinenoexcept |
Read the current state.
|
inline |
Subscribe to the state change.
handler | Handler to be invoked when the state changes |