xronos-sdk 0.2.0
Xronos C++ SDK
 
Loading...
Searching...
No Matches
xronos::sdk::BaseReaction::ProgrammableTimerEffect< T > Class Template Reference

Access to a programmable timer that this reaction may schedule events with. More...

#include <xronos/sdk/reaction.hh>

Public Member Functions

 ProgrammableTimerEffect (ProgrammableTimer< T > &timer, ReactionContext context)
 Construct a new ProgrammableTimerEffect object.
 
void schedule (const ImmutableValuePtr< T > &value_ptr, Duration delay=Duration::zero())
 Schedule a future timer event.
 
void schedule (MutableValuePtr< T > &&value_ptr, Duration delay=Duration::zero())
 
template<class U>
requires (!std::is_same_v<U, void> && std::is_same_v<T, U>)
void schedule (const U &value, Duration delay=Duration::zero())
 
template<class U>
requires (!std::is_same_v<U, void> && std::is_same_v<T, U>)
void schedule (U &&value, Duration delay=Duration::zero())
 
void schedule (Duration delay=Duration::zero())
 Schedule a future timer event.
 

Detailed Description

template<class T>
class xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >

Access to a programmable timer that this reaction may schedule events with.

Template Parameters
TThe type of value carried by the programmable timer.

Constructor & Destructor Documentation

◆ ProgrammableTimerEffect()

template<class T>
xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::ProgrammableTimerEffect ( ProgrammableTimer< T > & timer,
ReactionContext context )

Construct a new ProgrammableTimerEffect object.

Parameters
timerA programmable timer of the containing reactor, which can be obtained using the Reaction::self method.
contextThe current reaction's initialization context, which can be obtained using the BaseReaction::context method.

Member Function Documentation

◆ schedule() [1/5]

template<class T>
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule ( const ImmutableValuePtr< T > & value_ptr,
Duration delay = Duration::zero() )

Schedule a future timer event.

Parameters
value_ptrThe value to be associated with the event occurrence.
delayThe time to wait until the new event is processed.

◆ schedule() [2/5]

template<class T>
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule ( MutableValuePtr< T > && value_ptr,
Duration delay = Duration::zero() )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ schedule() [3/5]

template<class T>
template<class U>
requires (!std::is_same_v<U, void> && std::is_same_v<T, U>)
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule ( const U & value,
Duration delay = Duration::zero() )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ schedule() [4/5]

template<class T>
template<class U>
requires (!std::is_same_v<U, void> && std::is_same_v<T, U>)
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule ( U && value,
Duration delay = Duration::zero() )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ schedule() [5/5]

template<class T>
void xronos::sdk::BaseReaction::ProgrammableTimerEffect< T >::schedule ( Duration delay = Duration::zero())

Schedule a future timer event.

Parameters
delayThe time to wait until the new event is processed.

The documentation for this class was generated from the following file: