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( ) noexcept#
Constructor.
- Parameters:
type – The EventType to map.
dispatchName – The RString to map
typeto.pushName – For AdapterType::eFull adapters, indicates the RString to map
typeto on the push side.
- inline constexpr MappingEntry2(
- EventType type,
- RString dispatchName,
- cpp::span<const eventdispatcher::NamedVariant> filters,
Constructor.
- Parameters:
type – The EventType to map.
dispatchName – The RString to map
typeto.filters – A set of event selection criteria that must be exactly matched by the
dispatchNameevent in order to be caught by the adapter. This is used as thefilterArgspassed to eventdispatcher::IEventDispatcher::observeEvent.
- inline constexpr MappingEntry2(
- EventType type,
- RString dispatchName,
- RString pushName,
- cpp::span<const eventdispatcher::NamedVariant> filters,
Constructor.
- Parameters:
type – The EventType to map.
dispatchName – The RString to map
typeto.pushName – For AdapterType::eFull adapters, indicates the RString to map
typeto on the push side.filters – A set of event selection criteria that must be exactly matched by the
dispatchNameandpushNameevents in order to be caught by the adapter. This is used as thefilterArgspassed to eventdispatcher::IEventDispatcher::observeEvent.
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
filterArgspassed 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.
0is a valid EventType and often used for event streams that only push one event type.
-
RString dispatchName#
Name of
typefor 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
typefor the push side. If empty, no event is dispatched for an event stream’spush()call. An emptyRString()is used provide an unspecified push name. Ignored except for AdapterType::eFull.