DelayedStateCommand Class Template
Command that pairs a state transition request with a timer. More...
Declaration
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> | |
| TimerId | timerId () 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> | |
| TimerId | timerId_ |
|
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
- See Also
StateTransitionRequest
- See Also
Definition at line 41 of file DelayedStateCommand.ixx.
Public Constructors
DelayedStateCommand()
| 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()
| inline noexcept |
transitionRequest()
| inline noexcept |
Returns the transition request.
- Returns
The encapsulated transition request.
Definition at line 71 of file DelayedStateCommand.ixx.
Private Member Attributes
timerId_
|
The timer that gates this command.
Definition at line 51 of file DelayedStateCommand.ixx.
transitionRequest_
|
The transition request to process.
Definition at line 46 of file DelayedStateCommand.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.