ALib C++ Framework
by
Library Version: 2511 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::app::App::StateMachine::CommandList Struct Reference

Description:

A list of pairs of states and corresponding methods to process. This struct is used only once, namely with the field StateMachine::Program. The constructor of class App fills this list with all commands defined in the enumeration States. While the insertion methods AddBefore and AddAfter are provided for convenience, more complex manipulation of the list is allowed using the interface inherited from std::vector.

Definition at line 226 of file app.inl.

Inheritance diagram for alib::app::App::StateMachine::CommandList:

Public Method Index:

void AddAfter (Enum anchor, const Command &cmd)
void AddBefore (Enum anchor, const Command &cmd)

Method Details:

◆ AddAfter()

void alib::app::App::StateMachine::CommandList::AddAfter ( Enum anchor,
const Command & cmd )
inline

Adds a custom execution command (and state) after the given cmd.

See also
The helper-method static Command MakeCustom(Enum)  should be used to create the command that is to be provided as parameter cmd.
Parameters
anchorThe associated state to search in this vector and use as the insertion place.
If nullptr is passed, cmd will be inserted at the beginning of the list.
cmdThe command to be added.

Definition at line 256 of file app.inl.

◆ AddBefore()

void alib::app::App::StateMachine::CommandList::AddBefore ( Enum anchor,
const Command & cmd )
inline

Adds a custom execution command (and state) before the given cmd.

See also
The helper-method static Command MakeCustom(Enum)  should be used to create the command that is to be provided as parameter cmd.
Parameters
anchorThe associated state to search in this vector and use as the insertion place.
If nullptr is passed, cmd will be inserted at the end of the list.
cmdThe command to be added.

Definition at line 237 of file app.inl.


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