Health-GPS
1.2.2.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. More... | |
EventAggregator (EventAggregator &&other)=default | |
Constructs the EventAggregator using move semantics. More... | |
EventAggregator & | operator= (EventAggregator &&other)=default |
Replaces the EventAggregator contents with the other using move semantics. More... | |
EventAggregator (const EventAggregator &)=delete | |
EventAggregator & | operator= (const EventAggregator &)=delete |
virtual | ~EventAggregator ()=default |
Destroys a EventAggregator instance. More... | |
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. More... | |
virtual bool | unsubscribe (const EventSubscriber &subscriber)=0 |
Unsubscribes from an event notification. More... | |
virtual void | publish (std::unique_ptr< EventMessage > message)=0 |
Publishes a message to all subscribers synchronous. More... | |
virtual void | publish_async (std::unique_ptr< EventMessage > message)=0 |
Publishes a message to all subscribers asynchronous. More... | |
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.