The EventWatcher class defines a mechanism for managing events and callbacks.
More...
#include <event.h>
The EventWatcher class defines a mechanism for managing events and callbacks.
◆ EventWatcher()
| cil::EventWatcher::EventWatcher |
( |
| ) |
|
◆ ~EventWatcher()
| virtual cil::EventWatcher::~EventWatcher |
( |
| ) |
|
|
virtual |
◆ bind()
| void cil::EventWatcher::bind |
( |
const std::string & | name, |
|
|
EventCallback | callback ) |
Binds a callback function to a specific event name.
- Parameters
-
| name | A string representing the event name. |
| callback | An EventCallback object that will be called when the event is sent. |
◆ send()
| void cil::EventWatcher::send |
( |
const std::string & | name | ) |
|
Triggers an event by its name.
- Parameters
-
| name | A string representing the event name to be sent. |