libtcspc C++ API
Streaming TCSPC and time tag data processing
Loading...
Searching...
No Matches
Multiplexing and demultiplexing processors

Description

Processors that combine events of different types into a variant type and back.

Functions

template<typename Downstream>
auto tcspc::demultiplex (Downstream downstream)
 Create a processor that transforms an event variant type back to individual event types.
template<typename EventList, typename Downstream>
auto tcspc::multiplex (Downstream downstream)
 Create a processor that passes events as a single variant type.

Function Documentation

◆ demultiplex()

template<typename Downstream>
auto tcspc::demultiplex ( Downstream downstream)

Create a processor that transforms an event variant type back to individual event types.

This reverses the effect of tcspc::multiplex(), accepting tcspc::variant_event and emitting the stored events. Only tcspc::variant_event specializations whose type list is a subset of the events handled by downstream are handled.

See also
tcspc::multiplex()
Template Parameters
Downstreamdownstream processor type
Parameters
downstreamdownstream processor
Returns
processor
Events handled

◆ multiplex()

template<typename EventList, typename Downstream>
auto tcspc::multiplex ( Downstream downstream)

Create a processor that passes events as a single variant type.

This can be used, for example, to buffer more than one type of event in a stream. The emitted events are of the single type tcspc::variant_event<EventList>.

See also
tcspc::demultiplex()
Template Parameters
EventListevent types to combine
Downstreamdownstream processor type
Parameters
downstreamdownstream processor
Returns
processor
Events handled
  • Types in EventList: pass through wrapped in tcspc::variant_event<EventList>
  • Flush: pass through with no action