|
|
| State (MachineType *ptr) |
| |
| virtual StateId | id () const =0 |
| |
| MachineType * | state_machine () const |
| |
| virtual StateId | run (ContextType &ctx) |
| |
| virtual cloe::Logger | logger () const |
| |
|
| virtual StateId | impl (ContextType &ctx)=0 |
| |
|
|
void | to_json (cloe::Json &j, const State< MachineType, ContextType > &s) |
| |
◆ id()
template<typename MachineType , typename ContextType >
| virtual StateId engine::State< MachineType, ContextType >::id |
( |
| ) |
const |
|
pure virtual |
Return a C-string defining the unique name of this state.
It is important that all states be defined globally and statically, so that the pointer to the C-string is always the same.
◆ impl()
template<typename MachineType , typename ContextType >
| virtual StateId engine::State< MachineType, ContextType >::impl |
( |
ContextType & |
ctx | ) |
|
|
protectedpure virtual |
The implementation of this state behavior.
◆ logger()
template<typename MachineType , typename ContextType >
| virtual cloe::Logger engine::State< MachineType, ContextType >::logger |
( |
| ) |
const |
|
inlinevirtual |
Return the logger that should be used for this state.
◆ run()
template<typename MachineType , typename ContextType >
| virtual StateId engine::State< MachineType, ContextType >::run |
( |
ContextType & |
ctx | ) |
|
|
inlinevirtual |
Enter into this state and return the next state that should be executed.
If nullptr is returned, then the state machine aborts.
◆ state_machine()
template<typename MachineType , typename ContextType >
| MachineType* engine::State< MachineType, ContextType >::state_machine |
( |
| ) |
const |
|
inline |
Return a pointer to the state machine.
This is useful to accessing methods on the entire state machine, such as may be used for inserting interrupts.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/cloe/checkouts/v0.23.0/engine/src/utility/state_machine.hpp