registerEventAlias#
Fully qualified name: carb::events::registerEventAlias
Defined in carb/events/EventsAdapterUtils.h
- inline bool carb::events::registerEventAlias( )#
Registers an alias between an
EventType
and event name.This is generally recommended for use with AdapterType::eFullAlias. This allows event adapters created of type AdapterType::eFullAlias to map
eventType
with the corresponding eventdispatcher::IEventDispatcher event names for pushing (pushEvent
) and popping (popEvent
).Corresponding with the IEventsAdapter created from type AdapterType::eFullAlias, the following event names will be aliased (where
<eventType>
is a base-10 rendering ofeventType
as if by thePRIu64
printf format specifier):AdapterAlias:<eventType>:immediate
becomes an alias topushEvent
AdapterAlias:<eventType>
becomes an alias topopEvent
.
When the aliases are no longer needed, unregisterEventAlias() can be used to remove them.
- Parameters:
eventType – The EventType to use with aliasing. May not be 0.
pushEvent – The eventdispatcher::IEventDispatcher event name to use for push (immediate) events.
popEvent – The eventdispatcher::IEventDispatcher event name to use for pop (deferred) events.
- Returns:
true
if the aliases were created;false
if either alias could not be created oreventType
was 0.