The sending half of an EventBus: emit and enqueue, and no subscribe.
More...
#include <event_bus.h>
|
| template<typename EventT> |
| void | emit (const EventT &event) |
| | Fire event synchronously to every listener now (EventBus::emit).
|
| template<typename EventT> |
| void | enqueue (EventT event) |
| | Queue event for delivery on the next flush (EventBus::enqueue).
|
The sending half of an EventBus: emit and enqueue, and no subscribe.
What Behavior::events() hands a behavior, which must listen through Behavior::subscribe: a listener on the bus itself would outlive the behavior and its module, and a flush after reload would call unmapped code.
Copies freely; valid as long as the bus.
◆ emit()
template<typename EventT>
| void Vkm::Engine::EventSender::emit |
( |
const EventT & | event | ) |
|
|
inline |
Fire event synchronously to every listener now (EventBus::emit).
- Template Parameters
-
- Parameters
-
| event | Passed to each listener. |
◆ enqueue()
template<typename EventT>
| void Vkm::Engine::EventSender::enqueue |
( |
EventT | event | ) |
|
|
inline |
Queue event for delivery on the next flush (EventBus::enqueue).
- Template Parameters
-
- Parameters
-
| event | Event to queue; moved in. |
The documentation for this class was generated from the following file: