sttcl  v0.9c
STTCL C++ template state machine framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sttcl::StateBase< StateMachineImpl, IState > Class Template Reference

#include <State.h>

Inheritance diagram for sttcl::StateBase< StateMachineImpl, IState >:

List of all members.

Public Types

typedef StateMachineImpl Context
typedef IState StateInterface

Public Member Functions

virtual void finalizeSubStateMachines (bool recursive)=0
virtual void initSubStateMachines (bool recursive)=0
virtual void entry (Context *context)=0
virtual void exit (Context *context)=0
virtual void startDo (Context *context)=0
virtual void endDo (Context *context)=0
void changeStateImpl (Context *context, StateBase< StateMachineImpl, IState > *newState)
template<class StateMachineContext >
void changeStateImpl (StateMachineContext *context, StateBase< StateMachineImpl, IState > *newState)

Protected Member Functions

 StateBase ()
virtual ~StateBase ()

Friends

class StateMachine< StateMachineImpl, IState >

Detailed Description

template<class StateMachineImpl, class IState>
class sttcl::StateBase< StateMachineImpl, IState >

Represents a particular state machines state base class.

Template Parameters:
StateMachineImplThe state machine implementation type.
IStateSpecifies the internal interface of state implementations for the state machine.

Member Typedef Documentation


Constructor & Destructor Documentation

template<class StateMachineImpl, class IState>
sttcl::StateBase< StateMachineImpl, IState >::StateBase ( )
inlineprotected

Constructor for class StateBase.

template<class StateMachineImpl, class IState>
virtual sttcl::StateBase< StateMachineImpl, IState >::~StateBase ( )
inlineprotectedvirtual

Destructor for class StateBase.


Member Function Documentation

template<class StateMachineImpl, class IState>
void sttcl::StateBase< StateMachineImpl, IState >::changeStateImpl ( Context context,
StateBase< StateMachineImpl, IState > *  newState 
)
inline

Default implementation for the changeState() method.

Parameters:
contextA pointer to the containing state machine.
newStateThe new sibling state the containing state machine should change to.
template<class StateMachineImpl, class IState>
template<class StateMachineContext >
void sttcl::StateBase< StateMachineImpl, IState >::changeStateImpl ( StateMachineContext *  context,
StateBase< StateMachineImpl, IState > *  newState 
)
inline

Default implementation for the changeState() method.

Parameters:
contextA pointer to the containing state machine.
newStateThe new sibling state the containing state machine should change to.
template<class StateMachineImpl, class IState>
virtual void sttcl::StateBase< StateMachineImpl, IState >::endDo ( Context context)
pure virtual

Called by the containing state machine before the state is left.

Parameters:
contextA pointer to the containing state machine.
template<class StateMachineImpl, class IState>
virtual void sttcl::StateBase< StateMachineImpl, IState >::entry ( Context context)
pure virtual

Called by the containing state machine when the state is entered.

Parameters:
contextA pointer to the containing state machine.
template<class StateMachineImpl, class IState>
virtual void sttcl::StateBase< StateMachineImpl, IState >::exit ( Context context)
pure virtual

Called by the containing state machine when the state is left.

Parameters:
contextA pointer to the containing state machine.
template<class StateMachineImpl, class IState>
virtual void sttcl::StateBase< StateMachineImpl, IState >::startDo ( Context context)
pure virtual

Called by the containing state machine after the state was entered.

Parameters:
contextA pointer to the containing state machine.

Friends And Related Function Documentation

template<class StateMachineImpl, class IState>
friend class StateMachine< StateMachineImpl, IState >
friend

The documentation for this class was generated from the following file: