#include <StateMachine.h>
Public Types | |
| typedef State< MixinT > | ConcreteState |
| The type of the state being stored. | |
| typedef boost::shared_ptr< ConcreteState > | StatePtr |
| The type of the smart pointer used to hold the state instances. | |
| typedef std::map< KeyT, StatePtr > | StateMap |
| This is the map thay contains the States. | |
| typedef MapContainerIterator< StateMap > | StateIterator |
| This is the iterator over the States. | |
| typedef ConstMapContainerIterator< StateMap > | ConstStateIterator |
| This is the constant iterator over the States. | |
Public Member Functions | |
| FSM () | |
| Instantiates a new, empty, state machine. | |
| ~FSM () | |
| void | setCurrentState (KeyArgT key) |
| Set the current state by name. | |
| void | setCurrentState () |
| Sets the current state to be NULL. | |
| ConcreteState * | getCurrentState () const |
| Retrieve the current state of the machine. | |
| void | addState (KeyArgT key, StatePtr state) |
| Add a state to the machine. | |
| void | removeState (KeyArgT key) |
| Remove a state from the machine. | |
| void | clearStates () |
| Clear the states from the machine. | |
| StateIterator | getStateIterator () |
| Get an iterator over the state-name pairs. | |
| ConstStateIterator | getStateIterator () const |
| Get a costant iterator over the state-name pairs. | |
| ConcreteState & | operator * () |
| ConcreteState const & | operator * () const |
| ConcreteState * | operator-> () |
| ConcreteState const * | operator-> () const |
This class represents a generic finite state machine that is intended to execute functionality based on its current state.
|
|||||
|
The type of the state being stored.
|
|
|||||
|
This is the constant iterator over the States.
|
|
|||||
|
This is the iterator over the States.
|
|
|||||
|
This is the map thay contains the States.
|
|
|||||
|
The type of the smart pointer used to hold the state instances.
|
|
|||||||||
|
Instantiates a new, empty, state machine.
|
|
|||||||||
|
|
|
||||||||||||||||
|
Add a state to the machine. Add a named state to the machine. States may be shared between different machines, and may have different names in different machines.
|
|
|||||||||
|
Clear the states from the machine.
|
|
|||||||||
|
Retrieve the current state of the machine.
|
|
|||||||||
|
Get a costant iterator over the state-name pairs.
|
|
|||||||||
|
Get an iterator over the state-name pairs.
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
||||||||||
|
Remove a state from the machine. Removes a named state from the machine. If the state cannot be found this method has no effect.
|
|
|||||||||
|
Sets the current state to be NULL.
|
|
||||||||||
|
Set the current state by name. This sets the current state using the registered state name. If no state with the given name is found this function has no effect.
|
1.4.6-NO