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

Description

Basic and generic processors.

Topics

 Filtering processors
 Processors for filtering events.
 Batching and unbatching processors
 Processors that aggregate events into batches or extract individual events from batches.
 Multiplexing and demultiplexing processors
 Processors that combine events of different types into a variant type and back.
 Stopping processors
 Processors that stop processing when a given event is received.

Classes

class  tcspc::null_sink
 Processor that sinks any event and the end-of-stream and does nothing. More...
class  tcspc::type_erased_processor< EventList >
 Processor that type-erases the downstream processor. More...

Functions

template<typename Event, typename Downstream>
auto tcspc::append (Event event, Downstream downstream)
 Create a processor that inserts an event at the end of the stream.
template<typename Downstream>
auto tcspc::null_source (Downstream downstream)
 Create a processor that sources an empty stream.
template<typename Event, typename Downstream>
auto tcspc::prepend (Event event, Downstream downstream)
 Create a processor that inserts an event at the beginning of the stream.

Function Documentation

◆ append()

template<typename Event, typename Downstream>
auto tcspc::append ( Event event,
Downstream downstream )

Create a processor that inserts an event at the end of the stream.

All events are passed through. Before flushing, the given event is emitted.

Note
event is only appended upon a flush; if processing is ended by tcspc::end_of_processing being thrown by a downstream processor, this processor has no effect.
Template Parameters
Eventtype of event to append (usually deduced)
Downstreamdownstream processor type (usually deduced)
Parameters
eventevent to append
downstreamdownstream processor
Returns
processor
Events handled
  • Any type: pass through with no action
  • Flush: emit event; pass through

◆ null_source()

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

Create a processor that sources an empty stream.

Template Parameters
Downstreamdownstream processor type
Parameters
downstreamdownstream processor
Returns
processor
Events handled
  • Flush: pass through with no action

◆ prepend()

template<typename Event, typename Downstream>
auto tcspc::prepend ( Event event,
Downstream downstream )

Create a processor that inserts an event at the beginning of the stream.

All events are passed through. Before the first event is passed through, the given event is emitted.

Template Parameters
Eventtype of event to prepend (usually deduced)
Downstreamdownstream processor type (usually deduced)
Parameters
eventevent to prepend
downstreamdownstream processor
Returns
processor
Events handled
  • Any type: if the first event ever, emit event; pass through
  • Flush: pass through with no action