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

FSM::CFSMAction Class Reference

Base class for Actions. More...

#include <FSMAction.h>

Inheritance diagram for FSM::CFSMAction::

FSM::CFSMObject FSM::CFSMActionIncrVariable FSM::CFSMActionSetVariable List of all members.

Public Methods

virtual bool Execute (const char *event, void *a, void *b)=0
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

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

virtual void DeleteThis ()=0
 "Destructor" Simple call delete this. More...


Friends

class CFSMState
class CFSMTransition

Detailed Description

Base class for Actions.

Definition at line 76 of file FSMAction.h.


Constructor & Destructor Documentation

FSM::CFSMAction::CFSMAction   [protected]
 

Definition at line 37 of file FSMAction.cpp.

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

Definition at line 41 of file FSMAction.cpp.


Member Function Documentation

virtual void FSM::CFSMObject::DeleteThis   [protected, pure virtual, inherited]
 

"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 in FSM::CFSMActionSetVariable, FSM::CFSMActionIncrVariable, FSM::CFSMConditionTestVariable, FSM::CFSMState, FSM::CFSMSimpleTransition, FSM::CFSMPushTransition, and FSM::CFSMPopTransition.

virtual bool FSM::CFSMAction::Execute const char *    event,
void *    a,
void *    b
[pure virtual]
 

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

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(), FSM::CFSMPopTransition::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().

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::CFSMObject::SetFSM CFiniteStateMachine   ptr [protected, inherited]
 

Definition at line 51 of file FSMObject.cpp.

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 CFSMState [friend]
 

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

Definition at line 79 of file FSMAction.h.

friend class CFSMTransition [friend]
 

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

Definition at line 80 of file FSMAction.h.


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