Generic publisher which can be used to notify several observers. The observer callback arguments are template arguments. More...
#include <genericsyncpublisher.hpp>
Public Member Functions | |
| GenericSyncPublisher ()=default | |
| ctor More... | |
| void | publish (FunctionArgs... args) |
| Publish an event to all subscribed observers. More... | |
| bool | subscribe (GenericSyncObserver< FunctionArgs... > &observer) |
| Subscribe to the publisher events. More... | |
| bool | unsubscribe (GenericSyncObserver< FunctionArgs... > &observer) |
| Unsubscribe from publisher events. More... | |
| ~GenericSyncPublisher ()=default | |
| dtor More... | |
Generic publisher which can be used to notify several observers. The observer callback arguments are template arguments.
|
explicitdefault |
ctor
|
default |
dtor
|
inline |
Publish an event to all subscribed observers.
|
inline |
Subscribe to the publisher events.
| observer | The instance which will receive notifications in future |
|
inline |
Unsubscribe from publisher events.
| observer | The instance that will no longer receive notifications |