SourceForge Project Site
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

FSM::CFSMPopTransition Class Reference

Pop transition. More...

#include <FSMTransition.h>

Inheritance diagram for FSM::CFSMPopTransition::

FSM::CFSMTransition FSM::CFSMObject List of all members.

Public Methods

CFSMActionAddAction (const char *className)
CFSMActionGetAction (int index) const
bool DeleteAction (CFSMAction *action)
Action_List::const_iterator GetActionsBegin () const
 Use (*iterator) to get the pointer to the action. More...

Action_List::const_iterator GetActionsEnd () const
CFSMConditionAddCondition (const char *className="TestVariable")
CFSMConditionGetCondition (int index) const
bool DeleteCondition (CFSMCondition *condition)
Condition_List::const_iterator GetConditionsBegin () const
 Use (*iterator) to get the pointer to the condition. More...

Condition_List::const_iterator GetConditionsEnd () const
CFSMStateGetFromState () const
const char * GetOnEvent () const
void SetOnEvent (const char *event="ANY")
CFiniteStateMachineGetFSM () 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...

virtual bool Execute (const char *event, void *a, void *b)
 Called if the transition match. More...

 CFSMPopTransition ()
virtual ~CFSMPopTransition ()
void SetFromState (const char *stateName)
virtual bool Check (bool &result, const char *event, void *a, void *b)
 the answer is in result!!! More...

virtual bool Activate ()
 Called when the state is activated. More...

virtual bool Deactivate ()
 Called when the state is deactivated Calls Deactivate() of conditions (e.g. More...

void SetFSM (CFiniteStateMachine *ptr)
void SetClassName (const char *name)
virtual bool SaveParameters (CFSMSaver *out) const
 Called by the saver. More...


Static Protected Methods

CFSMObjectCreate ()

Friends

class CFSMState
class CFiniteStateMachine

Detailed Description

Pop transition.

The state is poped from stack.

Definition at line 239 of file FSMTransition.h.


Constructor & Destructor Documentation

FSM::CFSMPopTransition::CFSMPopTransition   [protected]
 

Definition at line 493 of file FSMTransition.cpp.

FSM::CFSMPopTransition::~CFSMPopTransition   [protected, virtual]
 

Definition at line 497 of file FSMTransition.cpp.


Member Function Documentation

bool FSM::CFSMTransition::Activate   [protected, virtual, inherited]
 

Called when the state is activated.

Calls Activate() of conditions (e.g. to start a timer)

Definition at line 286 of file FSMTransition.cpp.

References iRethrow.

CFSMAction * FSM::CFSMTransition::AddAction const char *    className [inherited]
 

Definition at line 64 of file FSMTransition.cpp.

References iRethrow.

CFSMCondition * FSM::CFSMTransition::AddCondition const char *    className = "TestVariable" [inherited]
 

Definition at line 135 of file FSMTransition.cpp.

References iRethrow.

bool FSM::CFSMTransition::Check bool &    retval,
const char *    event,
void *    a,
void *    b
[protected, virtual, inherited]
 

the answer is in result!!!

Returns:
is false if there where errors. Do not execute actions here, just check.

Definition at line 236 of file FSMTransition.cpp.

References iThrow(), and WARNING.

CFSMObject * FSM::CFSMPopTransition::Create   [static, protected]
 

Definition at line 531 of file FSMTransition.cpp.

bool FSM::CFSMTransition::Deactivate   [protected, virtual, inherited]
 

Called when the state is deactivated Calls Deactivate() of conditions (e.g.

to stop a timer)

Definition at line 301 of file FSMTransition.cpp.

References iRethrow, and FSM::CFSMTransition::m_Conditions.

bool FSM::CFSMTransition::DeleteAction CFSMAction   action [inherited]
 

Definition at line 100 of file FSMTransition.cpp.

References CRITICAL, iThrow(), and FSM::CFSMTransition::m_Actions.

bool FSM::CFSMTransition::DeleteCondition CFSMCondition   condition [inherited]
 

Definition at line 171 of file FSMTransition.cpp.

References CRITICAL, iThrow(), and FSM::CFSMTransition::m_Conditions.

void FSM::CFSMPopTransition::DeleteThis   [protected, virtual]
 

"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 536 of file FSMTransition.cpp.

bool FSM::CFSMPopTransition::Execute const char *    event,
void *    a,
void *    b
[protected, virtual]
 

Called if the transition match.

Execute actions and switch to a new state with push.

Reimplemented from FSM::CFSMTransition.

Definition at line 510 of file FSMTransition.cpp.

References FSM::CFSMObject::GetFSM(), and iRethrow.

CFSMAction * FSM::CFSMTransition::GetAction int    index const [inherited]
 

Returns:
the index-th action. index==0 -> first action. NULL if out of range

Definition at line 79 of file FSMTransition.cpp.

References CRITICAL, iThrow(), and FSM::CFSMTransition::m_Actions.

Action_List::const_iterator FSM::CFSMTransition::GetActionsBegin   const [inherited]
 

Use (*iterator) to get the pointer to the action.

Use ++iterator to get the next iterator.

Returns:
the begin-iterator of the actions container

Definition at line 122 of file FSMTransition.cpp.

References FSM::CFSMTransition::m_Actions.

Action_List::const_iterator FSM::CFSMTransition::GetActionsEnd   const [inherited]
 

Returns:
the end-iterator of the actions container

Definition at line 127 of file FSMTransition.cpp.

References FSM::CFSMTransition::m_Actions.

CFSMCondition * FSM::CFSMTransition::GetCondition int    index const [inherited]
 

Returns:
the index-th condition. index==0 -> first condition. NULL if out of range

Definition at line 150 of file FSMTransition.cpp.

References CRITICAL, iThrow(), and FSM::CFSMTransition::m_Conditions.

Condition_List::const_iterator FSM::CFSMTransition::GetConditionsBegin   const [inherited]
 

Use (*iterator) to get the pointer to the condition.

Use ++iterator to get the next iterator.

Returns:
the begin-iterator of the conditions container

Definition at line 193 of file FSMTransition.cpp.

References FSM::CFSMTransition::m_Conditions.

Condition_List::const_iterator FSM::CFSMTransition::GetConditionsEnd   const [inherited]
 

Returns:
the end-iterator of the conditions container

Definition at line 198 of file FSMTransition.cpp.

References FSM::CFSMTransition::m_Conditions.

CFSMState * FSM::CFSMTransition::GetFromState   const [inherited]
 

Definition at line 216 of file FSMTransition.cpp.

References FSM::CFSMTransition::CFSMState, FSM::CFSMObject::GetFSM(), iRethrow, and FSM::CFSMTransition::m_FromState.

Referenced by FSM::CFSMSimpleTransition::GetToState().

CFiniteStateMachine * FSM::CFSMObject::GetFSM   const [inherited]
 

Definition at line 56 of file FSMObject.cpp.

References FSM::CFSMObject::myStateMachine.

Referenced by FSM::CFSMState::AddLeaveAction(), FSM::CFSMState::AddSimpleTransition(), FSM::CFSMConditionTestVariable::CheckCondition(), Execute(), FSM::CFSMPushTransition::Execute(), FSM::CFSMSimpleTransition::Execute(), FSM::CFSMTransition::GetFromState(), and FSM::CFSMSimpleTransition::GetToState().

const char * FSM::CFSMObject::GetNameOfClass   const [inherited]
 

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 FSM::CFSMState::Activate(), FSM::CFSMConditionTestVariable::CheckCondition(), FSM::CFSMState::Deactivate(), FSM::CFSMSimpleTransition::SetParameter(), FSM::CFSMConditionTestVariable::SetParameter(), FSM::CFSMActionIncrVariable::SetParameter(), and FSM::CFSMActionSetVariable::SetParameter().

const char * FSM::CFSMTransition::GetOnEvent   const [inherited]
 

Definition at line 227 of file FSMTransition.cpp.

References FSM::CFSMTransition::m_Event.

bool FSM::CFSMObject::SaveParameters CFSMSaver   out const [protected, virtual, inherited]
 

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.

void FSM::CFSMObject::SetClassName const char *    name [protected, inherited]
 

Definition at line 61 of file FSMObject.cpp.

References FSM::CFSMObject::ClassName.

void FSM::CFSMTransition::SetFromState const char *    stateName [protected, inherited]
 

Definition at line 206 of file FSMTransition.cpp.

void FSM::CFSMObject::SetFSM CFiniteStateMachine   ptr [protected, inherited]
 

Definition at line 51 of file FSMObject.cpp.

void FSM::CFSMTransition::SetOnEvent const char *    event = "ANY" [inherited]
 

Definition at line 211 of file FSMTransition.cpp.

References FSM::CFSMTransition::m_Event.

bool FSM::CFSMObject::SetParameter const char *    paramName,
const char *    paramValue
[virtual, inherited]
 

Reimplemented in FSM::CFSMActionSetVariable, FSM::CFSMActionIncrVariable, FSM::CFSMConditionTestVariable, and FSM::CFSMSimpleTransition.

Definition at line 71 of file FSMObject.cpp.

References iThrow(), and WARNING.


Friends And Related Function Documentation

friend class CFiniteStateMachine [friend]
 

Reimplemented from FSM::CFSMTransition.

Definition at line 243 of file FSMTransition.h.

friend class CFSMState [friend]
 

Reimplemented from FSM::CFSMTransition.

Definition at line 242 of file FSMTransition.h.


The documentation for this class was generated from the following files:
© 2002 by C-LAB
generated by doxygen