libtcspc.Match

final class libtcspc.Match(event_type, out_event_type, matcher)[source]

Bases: Node

Processor that emits an output event for each matched event, passing all through.

For each event of event_type that the matcher matches, an out_event_type (constructed with the matched event’s abstime) is emitted. All input events, matched or not, pass through.

Parameters:
  • event_type (EventType) – The event type tested by the matcher.

  • out_event_type (EventType) – The event type emitted on a match. Must be constructible from an abstime.

  • matcher (Matcher) – The matcher deciding which events match.

Notes

Events handled:

  • event_type matched by the matcher: emit an out_event_type constructed from the matched event’s abstime.

  • All input events: pass through unchanged (matched or not).

  • End of input: pass through.

See also

tcspc::match()

The underlying C++ factory function.

MatchAndConsume

Like Match, but matched events are not passed through.