Declares a reaction trigger and provides read access to the triggering EventSource.
More...
#include <xronos/sdk/reaction.hh>
template<class T>
class xronos::sdk::BaseReaction::Trigger< T >
Declares a reaction trigger and provides read access to the triggering EventSource.
- Template Parameters
-
T | The value type associated with events received on the triggering event source. |
◆ Trigger()
Constructor.
Constructing a Trigger automatically registers the specified event source with the reaction, causing the reaction handler to run whenever the event source emits an event.
- Parameters
-
trigger | An EventSource source that should trigger the reaction. |
context | Context of the reaction the trigger is declared for. Can be obtained using context(). |
◆ get()
Get the value of a currently present event.
- Returns
- A pointer to the value of the current event, or nullptr if there is no current event (is_present() is false).
◆ is_present()
Check if an event is present at the current timestamp.
- Returns
- true if an event is present, false otherwise.
The documentation for this class was generated from the following file: