States for the StateMachine class.
More...
#include <state.h>
States for the StateMachine class.
States are used with the StateMachine class. For example usage, see the documentation for that class.
Definition at line 14 of file state.h.
| virtual void elma::State::during |
( |
| ) |
|
|
pure virtual |
A method that derived instances should define. It is called repeatedly by the update() method of the containing StateMachine when the state is active.
| void elma::State::emit |
( |
const Event & |
e | ) |
|
Emit an event. A wrapper around the emit() method of Manager
- Parameters
-
Definition at line 5 of file state.cc.
| virtual void elma::State::entry |
( |
const Event & |
e | ) |
|
|
pure virtual |
A method that derived instances should define. It is called when the state is entered by the state machine either when the machine starts or when a transition to the state is fired.
- Parameters
-
| e | The event that led to the transition into the state |
| virtual void elma::State::exit |
( |
const Event & |
e | ) |
|
|
pure virtual |
A method that derived instances should define. It is called just before the state is exited by the state machine when a transition from the state is fired.
- Parameters
-
| e | The event that led to the transition out of the state |
- Returns
- The id of the state (used internally, do not depend on its result)
Definition at line 34 of file state.h.
| std::string elma::State::name |
( |
| ) |
|
|
inline |
- Returns
- The name of the state
Definition at line 31 of file state.h.
The documentation for this class was generated from the following files: