registerEventAlias#

Fully qualified name: carb::events::registerEventAlias

Defined in carb/events/EventsAdapterUtils.h

inline bool carb::events::registerEventAlias(
EventType eventType,
RString pushEvent,
RString popEvent,
)#

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 of eventType as if by the PRIu64 printf format specifier):

  • AdapterAlias:<eventType>:immediate becomes an alias to pushEvent

  • AdapterAlias:<eventType> becomes an alias to popEvent.

When the aliases are no longer needed, unregisterEventAlias() can be used to remove them.

Parameters:
Returns:

true if the aliases were created; false if either alias could not be created or eventType was 0.