Processors for filtering events.
|
| template<typename GatedEventList, typename OpenEvent, typename CloseEvent, typename Downstream> |
| auto | tcspc::gate (arg::initially_open< bool > initially_open, Downstream downstream) |
| | Create a processor that gates events depending on current state.
|
| template<typename EventList, typename Downstream> |
| auto | tcspc::select (Downstream downstream) |
| | Create a processor that passes a given set of events and discards others.
|
| template<typename Downstream> |
| auto | tcspc::select_all (Downstream downstream) |
| | Create a processor that passes all events.
|
| template<typename Downstream> |
| auto | tcspc::select_none (Downstream downstream) |
| | Create a processor that passes no events.
|
| template<typename EventList, typename Downstream> |
| auto | tcspc::select_not (Downstream downstream) |
| | Create a processor that discards a given set of events and passes others.
|
template<typename GatedEventList, typename OpenEvent, typename CloseEvent, typename Downstream>
Create a processor that gates events depending on current state.
The processor keeps an internal boolean state: the gate. The initial state of the gate is determined by initially_open. When an OpenEvent is received, the gate is opened. When a CloseEvent is received, the gate is closed.
Events belonging to GatedEventList are gated: they are passed through if and only if the gate is currently open.
All events not in GatedEventList are passed through (including OpenEvent and CloseEvent).
- Template Parameters
-
| GatedEventList | event types to gate |
| OpenEvent | event type that opens the gate |
| CloseEvent | event type that closes the gate |
| Downstream | downstream processor type |
- Parameters
-
| initially_open | whether the gate is open before the first OpenEvent or CloseEvent event is received |
| downstream | downstream processor |
- Returns
- processor
- Events handled
- OpenEvent: open the gate; pass through
- CloseEvent: close the gate; pass through
- Types in GatedEventList: pass through if gate open; otherwise no action
- All other types: pass through with no action
- Flush: pass through with no action