sttcl
v0.9c
STTCL C++ template state machine framework
|
#include <State.h>
Public Types | |
typedef StateMachineImpl | Context |
typedef StateImpl | Implementation |
typedef StateBase < StateMachineImpl, IState > | StateBaseType |
typedef void(Implementation::* | StateDoAction )(Context *, bool) |
Public Types inherited from sttcl::StateBase< StateMachineImpl, IState > | |
typedef IState | StateInterface |
Public Member Functions | |
void | entryImpl (Context *context) |
void | exitImpl (Context *context) |
void | startDoImpl (Context *context) |
void | endDoImpl (Context *context) |
void | finalizeSubStateMachinesImpl (bool recursive) |
void | initSubStateMachinesImpl (bool recursive) |
bool | checkDirectTransitionImpl (Context *context, bool &finalize, StateBaseType *&nextState) |
Public Member Functions inherited from sttcl::StateBase< StateMachineImpl, IState > | |
void | changeStateImpl (Context *context, StateBase< StateMachineImpl, IState > *newState) |
template<class StateMachineContext > | |
void | changeStateImpl (StateMachineContext *context, StateBase< StateMachineImpl, IState > *newState) |
Protected Member Functions | |
State (StateDoAction argDoAction=0) | |
virtual | ~State () |
void | changeState (Context *context, StateBaseType *newState) |
template<class StateMachineContext > | |
void | changeState (StateMachineContext *context, StateBaseType *newState) |
Protected Member Functions inherited from sttcl::StateBase< StateMachineImpl, IState > | |
StateBase () | |
virtual | ~StateBase () |
Protected Attributes | |
StateDoAction | doAction |
Represents a particular state machines state implementation base class.
StateImpl | The state implementation type. |
StateMachine | The state machine implementation type. |
IState | Specifies the internal interface of state implementations for the state machine. |
typedef StateMachineImpl sttcl::State< StateImpl, StateMachineImpl, IState >::Context |
The state machine implementation type.
Reimplemented from sttcl::StateBase< StateMachineImpl, IState >.
typedef StateImpl sttcl::State< StateImpl, StateMachineImpl, IState >::Implementation |
The implementation class type.
typedef StateBase<StateMachineImpl,IState> sttcl::State< StateImpl, StateMachineImpl, IState >::StateBaseType |
The state base class type.
typedef void(Implementation::* sttcl::State< StateImpl, StateMachineImpl, IState >::StateDoAction)(Context *, bool) |
The state do action type. The first parameter is a pointer to the containing state machine, the second parameter indicates that the state do action is called the first time when true
.
|
inlineprotected |
Constructor for class State.
argDoAction | A pointer to the state do action. |
|
inlineprotectedvirtual |
Destructor for class State.
|
inlineprotected |
Changes context state machine to another sibling state.
context | A pointer to the containing state machine. |
newState | A pointer to the sibling state to change to. |
|
inlineprotected |
Changes context state machine to another sibling state.
context | A pointer to the containing state machine. |
newState | A pointer to the sibling state to change to. |
|
inline |
Default implementation for the getDirectTransitionImpl() method.
context | A pointer to the containing state machine. |
nextState | Receives a pointer to the next sibling state to appear on a direct transition. |
finalize | Receives true to finalize the containing state machine. |
true
if a direct transition should be performed, false
otherwise.
|
inline |
Default implementation for the endDo() method.
context | A pointer to the containing state machine. |
|
inline |
Default implementation for the entry() method.
context | A pointer to the containing state machine. |
|
inline |
Default implementation for the exit() method.
context | A pointer to the containing state machine. |
|
inline |
Default implementation for the finalizeSubStateMachines() method.
recursive | If true further sub state machines should be finalized recursively. |
|
inline |
Default implementation for the initSubStateMachines() method.
recursive | If true further sub state machines should be initialized recursively. |
|
inline |
Default implementation for the startDo() method.
context | A pointer to the containing state machine. |
|
protected |
The state do action.