qb
2.0.0.0
C++17 Actor Framework
|
Base policy for event handling. More...
#include <router.h>
Protected Member Functions | |
template<typename _Handler, typename _Event> | |
void | invoke (_Handler &handler, _Event &event) const |
Invoke a handler with an event. | |
template<typename _Event> | |
void | dispose (_Event &event) const noexcept |
Dispose of an event if necessary. |
Base policy for event handling.
Defines common event handling operations like invocation and disposal.
|
inlineprotected |
Invoke a handler with an event.
If the event type has an is_alive() method, it will be checked before invoking the handler.
_Handler | Handler type |
_Event | Event type |
handler | The handler to invoke |
event | The event to pass to the handler |
|
inlineprotectednoexcept |
Dispose of an event if necessary.
If the event type is not trivially destructible and has an is_alive() method, it will be destructed when is_alive() returns false.
_Event | Event type |
event | The event to dispose |