wns::fsm::FSM< SIGNALS, VARIABLES > Class Template Reference
Finite State Machines for C++.
More...
#include <fsm/FSM.hpp>
List of all members.
Detailed Description
template<typename SIGNALS, typename VARIABLES>
class wns::fsm::FSM< SIGNALS, VARIABLES >
A Finite State Machine (
FSM) is typically described by the signals it can receive, the variables it holds and possible states it might have at runtime. This template defines an
FSM with two parameters:
SIGNALS and VARIABLES
SIGNALS should be an abstract interface defining the signals the FSM can take. Each signal is represented by a method of the interface.
VARIABLES should be a struct/class containing the variables of the FSM.
The different states of this FSM are represented by different classes (or better objects of different classes).
- See also:
- How to write a Finite State Machine
Definition at line 66 of file FSM.hpp.
Member Typedef Documentation
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
Constructor & Destructor Documentation
template<typename SIGNALS, typename VARIABLES>
- Note:
- VARIABLES v will be COPIED(!!) into the FSM.
Definition at line 160 of file FSM.hpp.
template<typename SIGNALS, typename VARIABLES>
- Note:
- If VARIABLES is a POINTER(!!) to a struct, it will not be deleted.
Definition at line 174 of file FSM.hpp.
Member Function Documentation
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
template<typename NEWSTATE>
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
This is to be used in the state objects in order to modify the variables of the FSM.
Definition at line 223 of file FSM.hpp.
template<typename SIGNALS, typename VARIABLES>
Member Data Documentation
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
template<typename SIGNALS, typename VARIABLES>
The documentation for this class was generated from the following file: