#include <action_handler.hh>
Inheritance diagram for mpcl::automaton::TActionHandler< TState >:
Public Types | |
typedef std::list< TString > | TActionNamesList |
Action names list type. | |
Public Methods | |
TActionHandler (const unsigned int kuiRETRIES=1) throw (TIntegrityException) | |
virtual | ~TActionHandler (void) |
Destroys the instance. | |
int | execute (const TState &rktSTATE) |
void | setActions (const TState &rktSOURCE_STATE, const TActionNamesList &rktSOURCE_ACTION_NAMES_LIST) |
TActionNamesList | getActions (const TState &rktSOURCE_STATE) const |
Protected Types | |
typedef std::list< IAction * > | TActionList |
Pointer to action list type. | |
typedef TMap< TState, TActionList > | TStateToActionListMap |
Map with state to action lists bindings type. | |
Protected Attributes | |
TActionList | tActionList |
TStateToActionListMap | tStateToActionListMap |
Map with state to action lists bindings. |
Action Handler is the part of a Deterministic Finite Automaton (DFA) that executes the list of actions of a given state. Every individual action has a 'reaction' or error handling function.
A DFA that lacks a list of actions behaves as a classic, pattern recognizing DFA.
Definition at line 62 of file action_handler.hh.
|
Builds the instance with an optional retry value
Definition at line 124 of file action_handler.hh. |
|
Executes the actions for a given state
Definition at line 152 of file action_handler.hh. Referenced by mpcl::automaton::TExecutableStreamableDfa< TState, TEvent >::move(). |
|
Gets the list of action names of a given state.
Definition at line 235 of file action_handler.hh. References mpcl::automaton::TActionHandler< TState >::TActionNamesList, and mpcl::automaton::TActionHandler< TState >::tStateToActionListMap. |
|
Sets the actions for a given state.
Definition at line 265 of file action_handler.hh. References mpcl::automaton::TActionHandler< TState >::tActionList, mpcl::automaton::TActionHandler< TState >::TActionList, and mpcl::automaton::TActionHandler< TState >::tStateToActionListMap. |
|
List of possible actions for this DFA. This attribute musts be protected to allow sons to insert the proper actions. Definition at line 87 of file action_handler.hh. Referenced by mpcl::automaton::TActionHandler< TState >::setActions(), and mpcl::automaton::TActionHandler< int >::~TActionHandler(). |