Pyrogenesis
trunk
|
An association of event, condition, action and next state. More...
#include <FSM.h>
Public Member Functions | |
CFsmTransition (unsigned int state) | |
~CFsmTransition () | |
void | RegisterAction (void *pAction, void *pContext) |
Registers an action that will be executed when the transition occurs. More... | |
void | RegisterCondition (void *pCondition, void *pContext) |
Registers a condition which will be evaluated when the transition occurs. More... | |
void | SetEvent (CFsmEvent *pEvent) |
Set event for which transition will occur. More... | |
CFsmEvent * | GetEvent () const |
void | SetNextState (unsigned int nextState) |
Set next state the transition will switch the system to. More... | |
unsigned int | GetNextState () const |
unsigned int | GetCurrState () const |
const CallbackList & | GetActions () const |
const CallbackList & | GetConditions () const |
bool | ApplyConditions () const |
Evaluates conditions for the transition. More... | |
bool | RunActions () const |
Executes actions for the transition. More... | |
Private Member Functions | |
NONCOPYABLE (CFsmTransition) | |
Private Attributes | |
unsigned int | m_CurrState |
unsigned int | m_NextState |
CFsmEvent * | m_Event |
CallbackList | m_Actions |
CallbackList | m_Conditions |
An association of event, condition, action and next state.
CFsmTransition::CFsmTransition | ( | unsigned int | state | ) |
CFsmTransition::~CFsmTransition | ( | ) |
bool CFsmTransition::ApplyConditions | ( | ) | const |
Evaluates conditions for the transition.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
void CFsmTransition::RegisterAction | ( | void * | pAction, |
void * | pContext | ||
) |
Registers an action that will be executed when the transition occurs.
pAction | the function which will be executed. |
pContext | data passed to the function. |
void CFsmTransition::RegisterCondition | ( | void * | pCondition, |
void * | pContext | ||
) |
Registers a condition which will be evaluated when the transition occurs.
pCondition | the predicate which will be executed. |
pContext | data passed to the predicate. |
bool CFsmTransition::RunActions | ( | ) | const |
Executes actions for the transition.
void CFsmTransition::SetEvent | ( | CFsmEvent * | pEvent | ) |
Set event for which transition will occur.
void CFsmTransition::SetNextState | ( | unsigned int | nextState | ) |
Set next state the transition will switch the system to.
|
private |
|
private |
|
private |
|
private |
|
private |