|
Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
|
Defines the event aggregator interface type. More...
#include <event_aggregator.h>
Public Member Functions | |
| EventAggregator ()=default | |
| Initialises a new instance of the EventAggregator class. | |
| EventAggregator (EventAggregator &&other)=default | |
| Constructs the EventAggregator using move semantics. | |
| EventAggregator & | operator= (EventAggregator &&other)=default |
| Replaces the EventAggregator contents with the other using move semantics. | |
| EventAggregator (const EventAggregator &)=delete | |
| EventAggregator & | operator= (const EventAggregator &)=delete |
| virtual | ~EventAggregator ()=default |
| Destroys a EventAggregator instance. | |
| virtual std::unique_ptr< EventSubscriber > | subscribe (EventType event_id, std::function< void(std::shared_ptr< EventMessage > message)> handler)=0 |
| Subscribes a handler function to an event type identifier. | |
| virtual bool | unsubscribe (const EventSubscriber &subscriber)=0 |
| Unsubscribes from an event notification. | |
| virtual void | publish (std::unique_ptr< EventMessage > message) const =0 |
| Publishes a message to all subscribers synchronous. | |
| virtual void | publish_async (std::unique_ptr< EventMessage > message) const =0 |
| Publishes a message to all subscribers asynchronous. | |
Defines the event aggregator interface type.
|
default |
Initialises a new instance of the EventAggregator class.
|
default |
Constructs the EventAggregator using move semantics.
| other | The other EventAggregator instance to move |
|
delete |
|
virtualdefault |
Destroys a EventAggregator instance.
|
delete |
|
default |
Replaces the EventAggregator contents with the other using move semantics.
| other | The other EventAggregator instance to move |
|
pure virtual |
Publishes a message to all subscribers synchronous.
| message | The new message instance |
Implemented in hgps::DefaultEventBus.
|
pure virtual |
Publishes a message to all subscribers asynchronous.
| message | The new message instance |
Implemented in hgps::DefaultEventBus.
|
pure virtual |
Subscribes a handler function to an event type identifier.
| event_id | The event type to subscribe |
| handler | The event handler function to register |
Implemented in hgps::DefaultEventBus.
|
pure virtual |
Unsubscribes from an event notification.
| subscriber | The event subscriber instance |
Implemented in hgps::DefaultEventBus.