MappingEntry2#

Fully qualified name: carb::events::MappingEntry2

Defined in carb/events/IEventsAdapter.h

struct MappingEntry2 : public carb::events::MappingEntry#

Structure defining a mapping entry with filter criteria for use with AdapterDesc.

If additional filter criteria is specified, it is passed to the IEventStream instance’s calls to carb::eventdispatcher::IEventDispatcher::observeEvent so that events (sent through eventdispatcher) for the resulting IEventStream will only be received if they match the filter criteria. For events sent through the IEventStream (i.e. via IEventStream::dispatch or IEventStream::push), these filter parameters will be added for the translated eventdispatcher::Event that is sent through eventdispatcher::IEventDispatcher.

Public Functions

inline constexpr MappingEntry2(
EventType type,
RString dispatchName,
RString pushName = RString(),
) noexcept#

Constructor.

Parameters:
inline constexpr MappingEntry2(
EventType type,
RString dispatchName,
cpp::span<const eventdispatcher::NamedVariant> filters,
) noexcept#

Constructor.

Parameters:
inline constexpr MappingEntry2(
EventType type,
RString dispatchName,
RString pushName,
cpp::span<const eventdispatcher::NamedVariant> filters,
) noexcept#

Constructor.

Parameters:

Public Members

cpp::span<const eventdispatcher::NamedVariant> filters#

A set of event selection criteria that must be exactly matched by both the dispatchName event and the pushName event.

If empty, any event is matched. This is used as the filterArgs passed to carb::eventdispatcher::IEventDispatcher::observeEvent.

Events dispatched through the adapter will have these additional values added for the translation to the IEventDispatcher event.

EventType type#

An event type. Must be unique across all mappings provided to an AdapterDesc. 0 is a valid EventType and often used for event streams that only push one event type.

RString dispatchName#

Name of type for the pop/dispatch side. Required and must be unique across all mappings. Must be unique with respect to pushName if pushName is provided.

RString pushName#

Optional name of type for the push side. If empty, no event is dispatched for an event stream’s push() call. An empty RString() is used provide an unspecified push name. Ignored except for AdapterType::eFull.