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

FSM::CFSMActionIncrVariable Class Reference

Action, that increments a variable by the specified value (1 by default). More...

#include <FSMAction.h>

Inheritance diagram for FSM::CFSMActionIncrVariable::

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

Public Methods

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

void SetVariable (const char *varName)
void SetIncrement (int val)
const char * GetVariable () const
int GetIncrement () const
virtual bool Execute (const char *event, void *a, void *b)
virtual bool SetParameter (const char *paramName, const char *paramValue)
CFiniteStateMachineGetFSM () const
const char * GetNameOfClass () const
 The class name is set by FiniteStateMachine::Create(). More...


Static Public Methods

CFSMObjectCreate ()

Protected Methods

virtual bool SaveParameters (CFSMSaver *out) const
 Called by the saver. More...

void SetFSM (CFiniteStateMachine *ptr)
void SetClassName (const char *name)

Private Methods

 CFSMActionIncrVariable ()
virtual ~CFSMActionIncrVariable ()

Private Attributes

string variableName
int increment

Friends

class CFSMState
class CFSMTransition
class CFiniteStateMachine

Detailed Description

Action, that increments a variable by the specified value (1 by default).

Definition at line 133 of file FSMAction.h.


Constructor & Destructor Documentation

FSM::CFSMActionIncrVariable::CFSMActionIncrVariable   [private]
 

Definition at line 241 of file FSMAction.cpp.

FSM::CFSMActionIncrVariable::~CFSMActionIncrVariable   [private, virtual]
 

Definition at line 246 of file FSMAction.cpp.


Member Function Documentation

CFSMObject * FSM::CFSMActionIncrVariable::Create   [static]
 

Definition at line 215 of file FSMAction.cpp.

void FSM::CFSMActionIncrVariable::DeleteThis   [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 221 of file FSMAction.cpp.

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

Reimplemented from FSM::CFSMAction.

Definition at line 174 of file FSMAction.cpp.

References iRethrow.

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

int FSM::CFSMActionIncrVariable::GetIncrement   const
 

Definition at line 166 of file FSMAction.cpp.

References increment.

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(), SetParameter(), and FSM::CFSMActionSetVariable::SetParameter().

const char * FSM::CFSMActionIncrVariable::GetVariable   const
 

Definition at line 161 of file FSMAction.cpp.

References variableName.

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

Called by the saver.

Do not call directly. Overload and call out->SaveParameter() for each parameter.

Reimplemented from FSM::CFSMObject.

Definition at line 229 of file FSMAction.cpp.

References iRethrow.

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.

void FSM::CFSMActionIncrVariable::SetIncrement int    val
 

Definition at line 156 of file FSMAction.cpp.

References increment.

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

Reimplemented from FSM::CFSMObject.

Definition at line 191 of file FSMAction.cpp.

References CRITICAL, FSM::CFSMObject::GetNameOfClass(), increment, iThrow(), and variableName.

void FSM::CFSMActionIncrVariable::SetVariable const char *    varName
 

Definition at line 151 of file FSMAction.cpp.


Friends And Related Function Documentation

friend class CFiniteStateMachine [friend]
 

Reimplemented from FSM::CFSMObject.

Definition at line 138 of file FSMAction.h.

friend class CFSMState [friend]
 

Reimplemented from FSM::CFSMAction.

Definition at line 136 of file FSMAction.h.

friend class CFSMTransition [friend]
 

Reimplemented from FSM::CFSMAction.

Definition at line 137 of file FSMAction.h.


Member Data Documentation

int FSM::CFSMActionIncrVariable::increment [private]
 

Definition at line 165 of file FSMAction.h.

Referenced by GetIncrement(), SetIncrement(), and SetParameter().

string FSM::CFSMActionIncrVariable::variableName [private]
 

Definition at line 164 of file FSMAction.h.

Referenced by GetVariable(), and SetParameter().


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