Expand description
IEventDispatcher<H>, for any handler type H, and the macro that writes
a handler.
Every component hands out its events through the same template: a
dispatcher whose first slots add, remove and look up a handler. It declares
no destructor and no overload, so the slots are the declaration order on
both ABIs, and one generic wrapper serves every event group. The accessors
that return a dispatcher are generated (objects_event_dispatcher,
npcs_event_dispatcher, …), and so are the handlers of the groups the SDK
does not write by hand.
Modules§
- priority
- Where a handler runs relative to the others:
EventPriorityinevents.hpp.
Structs§
- Event
Dispatcher IEventDispatcher<H>*— held by pointer only.
Functions§
- add_
event_ ⚠handler addEventHandler(handler, priority).falsemeans the handler was already registered, or the dispatcher is null.- event_
handler_ ⚠count count()— how many handlers are registered.- remove_
event_ ⚠handler removeEventHandler(handler).falsemeans it was not registered.