Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

fsm.h File Reference

Finite state machine templates include file. More...

#include <vector>
#include <algorithm>
#include <stdexcept>
#include <deque>
#include <string>
#include <functional>
#include <iterator>
#include <iostream>
#include <boost/function.hpp>

Include dependency graph for fsm.h:

Go to the source code of this file.

Namespaces

namespace  FSM

Classes

class  FSM::SStateMachineException
 Exception definition for the state machine template class. More...
class  FSM::SEmptyFunctor< SState, SEvent >
 Predefined strategy for the template which bounds functions to states. Strategy supposes no entry, no exit functions calls. More...
class  FSM::SOnEnterFunctor< SState, SEvent >
 Predefined strategy for the template which bounds functions to states. Strategy supposes entry functions calls only. More...
class  FSM::SOnExitFunctor< SState, SEvent >
 Predefined strategy for the template which bounds functions to states. Strategy supposes exit functions calls only. More...
class  FSM::SOnMoveFunctor< SState, SEvent >
 Predefined strategy for the template which bounds functions to states. Strategy supposes both entry and exit functions calls. More...
class  FSM::SThrowStrategy< SEvent >
 Predefined strategy for both versions of the template. Strategy supposes throwing exception in case of the unknown event. More...
class  FSM::SIgnoreStrategy< SEvent >
 Predefined strategy for both versions of the template. Strategy supposes ignoging the unknown event. More...
class  FSM::SStateMachine< SState, SEvent, SFunctor, SUnknownEventStrategy >
 Finite state machine template which bounds functions to the states. More...
class  FSM::StateBase< Child, Event >
 Base class for the states to allow transition function specification. More...
class  FSM::SFuncStateMachine< SState, SEvent, SUnknownEventStrategy >
 Finite state machine template which bounds functions to the transitions. More...

Defines

#define FSM_BEGIN(StartFSMState)
#define FSM_STATES
#define FSM_EVENT(Arg)
#define FSM_END   )
#define FSM_RESET   FSM::ResetMachine
#define FUNCFSM_BEGIN(StartFSMState)
#define FUNCFSM_STATES
#define FUNCFSM_EVENT(Arg)
#define FUNCFSM_END   )
#define FUNCFSM_RESET   FSM::ResetMachine

Enumerations

enum  FSM::SMachineManipulator { FSM::ResetMachine = 0 }
 Machine manipulators are defined here. More...
enum  FSM::STransitionManipulator { FSM::NONE = 0, FSM::EXCEPTION = 1 }
 Transition manipulators are defined here. More...

Functions

template<typename SState, typename SEvent, typename SFunctor, typename SUnknownEventStrategy>
std::ostream & FSM::operator<< (std::ostream &Stream, const SStateMachine< SState, SEvent, SFunctor, SUnknownEventStrategy > &Machine)
 Allow writing the current machine state to an output stream.
template<typename SState, typename SEvent, typename SUnknownEventStrategy>
std::ostream & FSM::operator<< (std::ostream &Stream, const SFuncStateMachine< SState, SEvent, SUnknownEventStrategy > &Machine)
 Allow writing the current machine state to an output stream.


Detailed Description

Finite state machine templates include file.

Definition in file fsm.h.


Define Documentation

#define FSM_BEGIN StartFSMState   ) 
 

Value:

(StartFSMState),                         \
                                   FSM::SStateMachineProxy<FSMStateType,    \
                                                           FSMEventType>    \
                                       () << (                              \
                                   FSM::SStatesListProxy<FSMStateType>() <<
Used to start a finite state machine description in a constructor. Used for the template which bounds functions to states. Preliminary requirements: FSMStateType and FSMEventType symbolic names must be defined.

Definition at line 45 of file fsm.h.

#define FSM_END   )
 

Used to finish a finite state machine description in a constructor. Used for the template which bounds functions to states. There are no preliminary requirements.

Definition at line 74 of file fsm.h.

#define FSM_EVENT Arg   ) 
 

Value:

)                                        \
                                   << (FSM::STransitionsProxy<FSMStateType, \
                                                              FSMEventType> \
                                      ( Arg ) <<
Used to provide a list of transitions for a single event in a constructor. Used for the template which bounds functions to states. Preliminary requirements: FSMStateType and FSMEventType symbolic names must be defined.

Definition at line 64 of file fsm.h.

#define FSM_RESET   FSM::ResetMachine
 

Used to reset a finite state machine to the initail state. Used for both versions of the template. There are no preliminary requirements.

Definition at line 81 of file fsm.h.

#define FSM_STATES
 

Used to provide a list of legal states in a constructor. Used for the template which bounds functions to states. There are no preliminary requirements.

Definition at line 56 of file fsm.h.

#define FUNCFSM_BEGIN StartFSMState   ) 
 

Value:

(StartFSMState),                         \
                                   FSM::SFuncStateMachineProxy<FSMStateType,    \
                                                               FSMEventType>    \
                                       () << (                                  \
                                   FSM::SStatesListProxy<FSMStateType>() <<
Used to start a finite state machine description in a constructor. Used for the template which bounds functions to transitions. Preliminary requirements: FSMStateType and FSMEventType symbolic names must be defined.

Definition at line 91 of file fsm.h.

#define FUNCFSM_END   )
 

Used to finish a finite state machine description in a constructor. Used for the template which bounds functions to transitions. There are no preliminary requirements.

Definition at line 120 of file fsm.h.

#define FUNCFSM_EVENT Arg   ) 
 

Value:

)                                        \
                                   << (FSM::SFuncTransitionsProxy<FSMStateType, \
                                                                  FSMEventType> \
                                      ( Arg ) <<
Used to provide a list of transitions for a single event in a constructor. Used for the template which bounds functions to transitions. Preliminary requirements: FSMStateType and FSMEventType symbolic names must be defined.

Definition at line 110 of file fsm.h.

#define FUNCFSM_RESET   FSM::ResetMachine
 

Used to reset a finite state machine to the initail state. Used for both versions of the template. There are no preliminary requirements.

Definition at line 126 of file fsm.h.

#define FUNCFSM_STATES
 

Used to provide a list of legal states in a constructor. Used for the template which bounds functions to transitions. There are no preliminary requirements.

Definition at line 102 of file fsm.h.


Generated on Thu Sep 15 21:35:19 2005 for Finite State Machine C++ Templates by  doxygen 1.4.4