#include <FSMState.h>
Inheritance diagram for FSM::CFSMState::

Public Methods | |
| CFSMTransition * | AddTransition (const char *onEvent="ANY", const char *className="SimpleTransition") |
| CFSMTransition * | AddSimpleTransition (const char *toStateName, const char *onEvent="ANY") |
| int | GetTransitionNumber () const |
| CFSMTransition * | GetTransition (int index) const |
| bool | DeleteTransition (CFSMTransition *trans) |
| Delete one transition. More... | |
| Transition_List::const_iterator | GetTransitionsBegin () const |
| Use (*iterator) to get the pointer to the transition. More... | |
| Transition_List::const_iterator | GetTransitionsEnd () const |
| CFSMAction * | AddEnterAction (const char *className) |
| Create an action, that is executed at entering the state. More... | |
| CFSMAction * | AddLeaveAction (const char *className) |
| Create an action, that is executed at leaving the state. More... | |
| bool | DeleteAction (CFSMAction *action) |
| Delete an action. More... | |
| CFSMAction * | GetEnterAction (int index) const |
| CFSMAction * | GetLeaveAction (int index) const |
| Action_List::const_iterator | GetEnterActionsBegin () const |
| Use (*iterator) to get the pointer to the action. More... | |
| Action_List::const_iterator | GetEnterActionsEnd () const |
| Action_List::const_iterator | GetLeaveActionsBegin () const |
| Use (*iterator) to get the pointer to the action. More... | |
| Action_List::const_iterator | GetLeaveActionsEnd () const |
| const char * | GetName () const |
| CFiniteStateMachine * | GetFSM () const |
| const char * | GetNameOfClass () const |
| The class name is set by FiniteStateMachine::Create(). More... | |
| virtual bool | SetParameter (const char *paramName, const char *paramValue) |
Protected Methods | |
| virtual void | DeleteThis () |
| "Destructor" Simple call delete this. More... | |
| void | SetName (const char *name) |
| virtual bool | GetTransition (CFSMTransition **trans, const char *event, void *a, void *b) |
| Get the Transition, that would be triggered. More... | |
| virtual bool | Activate () |
| FSM has changed into this state. More... | |
| virtual bool | Deactivate () |
| FSM has changed the state. More... | |
| CFSMState () | |
| Use create to create a new instance. More... | |
| virtual | ~CFSMState () |
| Use DeleteThis() method instead of delete, because of memory. More... | |
| void | SetFSM (CFiniteStateMachine *ptr) |
| void | SetClassName (const char *name) |
| virtual bool | SaveParameters (CFSMSaver *out) const |
| Called by the saver. More... | |
Static Protected Methods | |
| CFSMObject * | Create () |
Protected Attributes | |
| Transition_List | m_Transitions |
| the list of transitions. More... | |
| Action_List | m_EnterActions |
| the list of enter actions. More... | |
| Action_List | m_LeaveActions |
| the list of leave actions. More... | |
Private Attributes | |
| string | m_Name |
Friends | |
| class | CFiniteStateMachine |
|
|
Use create to create a new instance.
Definition at line 32 of file FSMState.cpp. |
|
|
Use DeleteThis() method instead of delete, because of memory.
Definition at line 36 of file FSMState.cpp. References m_EnterActions, m_LeaveActions, and m_Transitions. |
|
|
FSM has changed into this state. Enter Actions are executed. Definition at line 387 of file FSMState.cpp. References GetName(), FSM::CFSMObject::GetNameOfClass(), iRethrow, m_EnterActions, and m_Transitions. |
|
|
Create an action, that is executed at entering the state.
Definition at line 214 of file FSMState.cpp. References iRethrow. |
|
|
Create an action, that is executed at leaving the state.
Definition at line 230 of file FSMState.cpp. References FSM::CFSMObject::GetFSM(), iRethrow, and m_LeaveActions. |
|
||||||||||||
|
Definition at line 77 of file FSMState.cpp. References FSM::CFSMObject::GetFSM(), GetName(), iRethrow, and m_Transitions. |
|
||||||||||||
|
Definition at line 58 of file FSMState.cpp. References iRethrow. |
|
|
Definition at line 457 of file FSMState.cpp. |
|
|
FSM has changed the state. Leave Actions are executed. Definition at line 420 of file FSMState.cpp. References GetName(), FSM::CFSMObject::GetNameOfClass(), iRethrow, m_LeaveActions, and m_Transitions. |
|
|
Delete an action.
Definition at line 246 of file FSMState.cpp. References CRITICAL, iThrow(), m_EnterActions, and m_LeaveActions. |
|
|
"Destructor" Simple call delete this. This is needed because of the memory management in shared libraries. Provide a static method "Create" in derived classes that returns a new instance of that class and use DeleteThis to destroy it. The constructor and destructor shuld be protected. Reimplemented from FSM::CFSMObject. Definition at line 462 of file FSMState.cpp. |
|
|
Delete one transition.
Definition at line 179 of file FSMState.cpp. References CRITICAL, iThrow(), and m_Transitions. |
|
|
Definition at line 285 of file FSMState.cpp. References CRITICAL, iThrow(), and m_EnterActions. |
|
|
Use (*iterator) to get the pointer to the action. Use ++iterator to get the next iterator.
Definition at line 327 of file FSMState.cpp. References m_EnterActions. |
|
|
Definition at line 332 of file FSMState.cpp. References m_EnterActions. |
|
|
Definition at line 56 of file FSMObject.cpp. References FSM::CFSMObject::myStateMachine. Referenced by AddLeaveAction(), AddSimpleTransition(), FSM::CFSMConditionTestVariable::CheckCondition(), FSM::CFSMPopTransition::Execute(), FSM::CFSMPushTransition::Execute(), FSM::CFSMSimpleTransition::Execute(), FSM::CFSMTransition::GetFromState(), and FSM::CFSMSimpleTransition::GetToState(). |
|
|
Definition at line 306 of file FSMState.cpp. References CRITICAL, iThrow(), and m_LeaveActions. |
|
|
Use (*iterator) to get the pointer to the action. Use ++iterator to get the next iterator.
Definition at line 337 of file FSMState.cpp. References m_LeaveActions. |
|
|
Definition at line 342 of file FSMState.cpp. References m_LeaveActions. |
|
|
Definition at line 350 of file FSMState.cpp. Referenced by Activate(), AddSimpleTransition(), and Deactivate(). |
|
|
The class name is set by FiniteStateMachine::Create(). So do not make Create methods public. Definition at line 66 of file FSMObject.cpp. References FSM::CFSMObject::ClassName. Referenced by Activate(), FSM::CFSMConditionTestVariable::CheckCondition(), Deactivate(), FSM::CFSMSimpleTransition::SetParameter(), FSM::CFSMConditionTestVariable::SetParameter(), FSM::CFSMActionIncrVariable::SetParameter(), and FSM::CFSMActionSetVariable::SetParameter(). |
|
||||||||||||||||||||
|
Get the Transition, that would be triggered.
Definition at line 363 of file FSMState.cpp. References iRethrow. |
|
|
Definition at line 119 of file FSMState.cpp. References CRITICAL, iThrow(), and m_Transitions. |
|
|
Definition at line 114 of file FSMState.cpp. References m_Transitions. |
|
|
Use (*iterator) to get the pointer to the transition. Use ++iterator to get the next iterator.
Definition at line 201 of file FSMState.cpp. References m_Transitions. |
|
|
Definition at line 206 of file FSMState.cpp. References m_Transitions. |
|
|
Called by the saver. Do not call directly. Overload and call out->SaveParameter() for each parameter. Reimplemented in FSM::CFSMActionSetVariable, FSM::CFSMActionIncrVariable, FSM::CFSMConditionTestVariable, and FSM::CFSMSimpleTransition. Definition at line 80 of file FSMObject.cpp. |
|
|
Definition at line 61 of file FSMObject.cpp. References FSM::CFSMObject::ClassName. |
|
|
Definition at line 51 of file FSMObject.cpp. |
|
|
Definition at line 355 of file FSMState.cpp. References m_Name. |
|
||||||||||||
|
Reimplemented in FSM::CFSMActionSetVariable, FSM::CFSMActionIncrVariable, FSM::CFSMConditionTestVariable, and FSM::CFSMSimpleTransition. Definition at line 71 of file FSMObject.cpp. |
|
|
Reimplemented from FSM::CFSMObject. Definition at line 82 of file FSMState.h. |
|
|
the list of enter actions.
Definition at line 181 of file FSMState.h. Referenced by Activate(), DeleteAction(), GetEnterAction(), GetEnterActionsBegin(), GetEnterActionsEnd(), and ~CFSMState(). |
|
|
the list of leave actions.
Definition at line 184 of file FSMState.h. Referenced by AddLeaveAction(), Deactivate(), DeleteAction(), GetLeaveAction(), GetLeaveActionsBegin(), GetLeaveActionsEnd(), and ~CFSMState(). |
|
|
Definition at line 194 of file FSMState.h. Referenced by SetName(). |
|
|
the list of transitions.
Definition at line 178 of file FSMState.h. Referenced by Activate(), AddSimpleTransition(), Deactivate(), DeleteTransition(), GetTransition(), GetTransitionNumber(), GetTransitionsBegin(), GetTransitionsEnd(), and ~CFSMState(). |