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

FSM::CFSMObject Class Reference

#include <FSMObject.h>

Inheritance diagram for FSM::CFSMObject::

FSM::CFSMAction FSM::CFSMCondition FSM::CFSMState FSM::CFSMTransition FSM::CFSMActionIncrVariable FSM::CFSMActionSetVariable FSM::CFSMConditionTestVariable FSM::CFSMPopTransition FSM::CFSMSimpleTransition FSM::CFSMPushTransition List of all members.

Public Methods

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

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...

 CFSMObject ()
virtual ~CFSMObject ()

Private Attributes

string ClassName
CFiniteStateMachinemyStateMachine

Friends

class CFiniteStateMachine
class CFSMSaver

Constructor & Destructor Documentation

FSM::CFSMObject::CFSMObject   [protected]
 

Definition at line 36 of file FSMObject.cpp.

References ClassName, and myStateMachine.

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

Definition at line 42 of file FSMObject.cpp.

References ClassName, and myStateMachine.


Member Function Documentation

virtual void FSM::CFSMObject::DeleteThis   [protected, pure 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 in FSM::CFSMActionSetVariable, FSM::CFSMActionIncrVariable, FSM::CFSMConditionTestVariable, FSM::CFSMState, FSM::CFSMSimpleTransition, FSM::CFSMPushTransition, and FSM::CFSMPopTransition.

CFiniteStateMachine * FSM::CFSMObject::GetFSM   const
 

Definition at line 56 of file FSMObject.cpp.

References 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
 

The class name is set by FiniteStateMachine::Create().

So do not make Create methods public.

Definition at line 66 of file FSMObject.cpp.

References 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]
 

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]
 

Definition at line 61 of file FSMObject.cpp.

References ClassName.

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

Definition at line 51 of file FSMObject.cpp.

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

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

Definition at line 72 of file FSMObject.h.

friend class CFSMSaver [friend]
 

Definition at line 73 of file FSMObject.h.


Member Data Documentation

string FSM::CFSMObject::ClassName [private]
 

Definition at line 117 of file FSMObject.h.

Referenced by CFSMObject(), GetNameOfClass(), SetClassName(), and ~CFSMObject().

CFiniteStateMachine* FSM::CFSMObject::myStateMachine [private]
 

Definition at line 120 of file FSMObject.h.

Referenced by CFSMObject(), GetFSM(), and ~CFSMObject().


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