Class to centrally manage all events for the application Exposes methods to register subscribers that need to respond to events, and to publish events Dynamically manages a linked list of subscribers to be notified when a relevant event is published Subscribers must extend the EventListener class and implement the onEvent() virtual method provided.
More...
#include <EventManager.h>
Class to centrally manage all events for the application Exposes methods to register subscribers that need to respond to events, and to publish events Dynamically manages a linked list of subscribers to be notified when a relevant event is published Subscribers must extend the EventListener class and implement the onEvent() virtual method provided.
◆ EventManager()
EventManager::EventManager |
( |
| ) |
|
Constructor for the instance.
◆ isSubscribed()
Method to check if the specified listener is subscribed to the specified event type.
- Parameters
-
eventListener | Pointer to a class instance that extends the EventListener class |
eventType | Valid EventType to check subscription for |
- Returns
- true|false
◆ publish()
Method to publish an event.
- Parameters
-
eventType | A valid EventType |
eventData | Valid EventData |
◆ subscribe()
Method to subscribe a listener to the specified event type.
- Parameters
-
eventLister | Pointer to a class instance that extends the EventListener class |
eventType | Valid EventType the subscriber needs to be notified about |
◆ unsubscribe()
Method to unsubscribe the listener from the specified event type.
- Parameters
-
eventListener | Pointer to a class instance that extends the EventListener class |
eventType | Valid EventType to unsubscribe from |
◆ _firstEventSubscriber
The documentation for this class was generated from the following files: