Skip to main content

DelayedStateCommand Class Template

Command that pairs a state transition request with a timer. More...

Declaration

template <typename StateType> class helios::engine::state::commands::DelayedStateCommand<StateType> { ... }

Public Constructors Index

template <typename StateType>
DelayedStateCommand (StateTransitionRequest< StateType > transitionRequest, TimerId timerId)

Constructs a delayed state command. More...

Public Member Functions Index

template <typename StateType>
auto transitionRequest () const noexcept -> types::StateTransitionRequest< StateType >

Returns the transition request. More...

template <typename StateType>
TimerIdtimerId () const noexcept

Returns the associated timer identifier. More...

Private Member Attributes Index

template <typename StateType>
StateTransitionRequest< StateType >transitionRequest_

The transition request to process. More...

template <typename StateType>
TimerIdtimerId_

The timer that gates this command. More...

Description

Command that pairs a state transition request with a timer.

Unlike StateCommand, which triggers a transition immediately during the next flush, DelayedStateCommand associates the request with a TimerId. The TypedCommandBuffer holds the command until the referenced timer expires, then forwards it to the StateManager.

When the StateManager receives a DelayedStateCommand via submit(), it extracts the StateTransitionRequest and enqueues it as a regular StateCommand — the timer ID is not retained by the manager.

Template Parameters
StateType

The state enum type.

See Also

StateCommand

See Also

StateTransitionRequest

See Also

StateManager

Definition at line 41 of file DelayedStateCommand.ixx.

Public Constructors

DelayedStateCommand()

template <typename StateType>
helios::engine::state::commands::DelayedStateCommand< StateType >::DelayedStateCommand (StateTransitionRequest< StateType > transitionRequest, TimerId timerId)
inline explicit

Constructs a delayed state command.

Parameters
transitionRequest

The transition to perform when the timer fires.

timerId

Identifier of the timer that triggers this command.

Definition at line 61 of file DelayedStateCommand.ixx.

Public Member Functions

timerId()

template <typename StateType>
TimerId helios::engine::state::commands::DelayedStateCommand< StateType >::timerId ()
inline noexcept

Returns the associated timer identifier.

Returns

The TimerId that gates this command.

Definition at line 80 of file DelayedStateCommand.ixx.

81 return timerId_;
82 }

transitionRequest()

template <typename StateType>
types::StateTransitionRequest< StateType > helios::engine::state::commands::DelayedStateCommand< StateType >::transitionRequest ()
inline noexcept

Returns the transition request.

Returns

The encapsulated transition request.

Definition at line 71 of file DelayedStateCommand.ixx.

Private Member Attributes

timerId_

template <typename StateType>
TimerId helios::engine::state::commands::DelayedStateCommand< StateType >::timerId_

The timer that gates this command.

Definition at line 51 of file DelayedStateCommand.ixx.

51 TimerId timerId_;

transitionRequest_

template <typename StateType>
StateTransitionRequest<StateType> helios::engine::state::commands::DelayedStateCommand< StateType >::transitionRequest_

The transition request to process.

Definition at line 46 of file DelayedStateCommand.ixx.

46 StateTransitionRequest<StateType> transitionRequest_;

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


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.