|
Open Model Railroad Network (OpenMRN)
|
A class for reliably detecting whether a Notification has happened yet or not. More...
#include <Notifiable.hxx>
Public Member Functions | |
| Notifiable * | NewCallback (Notifiable *parent) |
| Creates a new callback. | |
| bool | HasBeenNotified () |
Private Member Functions | |
| void | notify () override |
| Implementation of the private Notifiable interface. | |
Private Attributes | |
| Notifiable * | parent_ |
| Where to proxy notifications. | |
A class for reliably detecting whether a Notification has happened yet or not.
ProxyNotifiable can give a Notifiable callback, proxy to a parent Notifiable any calls that may come in, and tell through HasBeenNotified whether such a callback has happened yet or not.
Definition at line 129 of file Notifiable.hxx.
|
inline |
Definition at line 132 of file Notifiable.hxx.
|
inline |
Definition at line 151 of file Notifiable.hxx.
|
inline |
Creates a new callback.
When this callback is called, the parent notifiable is called and HasBeenNotified() will return true after that point. This function must not be called again until the returned callback is invoked.
| parent | where to proxy notifications to. |
Definition at line 143 of file Notifiable.hxx.
|
inlineoverrideprivatevirtual |
Implementation of the private Notifiable interface.
Implements Notifiable.
Definition at line 158 of file Notifiable.hxx.
|
private |
Where to proxy notifications.
If nullptr, then this was already notified and shall not be notified again.
Definition at line 168 of file Notifiable.hxx.