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

FSM::CFSMConditionTestVariable Class Reference

#include <FSMCondition.h>

Inheritance diagram for FSM::CFSMConditionTestVariable::

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

Public Types

enum  OP {
  EQUAL, NEQUAL, GREATER, LESS,
  GREATER_EQ, LESS_EQ
}

Public Methods

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

void SetCondition (const char *varName, OP testCondition, int testValue)
bool SetExpression (const char *expression)
const char * GetVariable () const
OP GetCondition () const
int GetValue () const
virtual bool SetParameter (const char *paramName, const char *paramValue)
virtual bool CheckCondition (const char *event, void *a, void *b)
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...

virtual bool Activate ()
virtual bool Deactivate ()
void SetFSM (CFiniteStateMachine *ptr)
void SetClassName (const char *name)

Private Methods

 CFSMConditionTestVariable ()
virtual ~CFSMConditionTestVariable ()

Private Attributes

string variableName
OP condition
int value

Friends

class CFSMTransition
class CFiniteStateMachine

Member Enumeration Documentation

enum FSM::CFSMConditionTestVariable::OP
 

Enumeration values:
EQUAL 
NEQUAL 
GREATER 
LESS 
GREATER_EQ 
LESS_EQ 

Definition at line 95 of file FSMCondition.h.


Constructor & Destructor Documentation

FSM::CFSMConditionTestVariable::CFSMConditionTestVariable   [private]
 

Definition at line 358 of file FSMCondition.cpp.

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

Definition at line 362 of file FSMCondition.cpp.


Member Function Documentation

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

Definition at line 46 of file FSMCondition.cpp.

bool FSM::CFSMConditionTestVariable::CheckCondition const char *    event,
void *    a,
void *    b
[virtual]
 

Reimplemented from FSM::CFSMCondition.

Definition at line 262 of file FSMCondition.cpp.

References EQUAL, FSM::CFSMObject::GetFSM(), FSM::CFSMObject::GetNameOfClass(), GREATER, GREATER_EQ, iHandleLastError, iThrow(), LESS, LESS_EQ, NEQUAL, value, variableName, and WARNING.

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

Definition at line 306 of file FSMCondition.cpp.

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

Definition at line 51 of file FSMCondition.cpp.

void FSM::CFSMConditionTestVariable::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 311 of file FSMCondition.cpp.

CFSMConditionTestVariable::OP FSM::CFSMConditionTestVariable::GetCondition   const
 

Definition at line 86 of file FSMCondition.cpp.

References condition.

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

int FSM::CFSMConditionTestVariable::GetValue   const
 

Definition at line 91 of file FSMCondition.cpp.

References value.

const char * FSM::CFSMConditionTestVariable::GetVariable   const
 

Definition at line 81 of file FSMCondition.cpp.

References variableName.

bool FSM::CFSMConditionTestVariable::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 319 of file FSMCondition.cpp.

References CRITICAL, iRethrow, and iThrow().

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

Definition at line 61 of file FSMObject.cpp.

References FSM::CFSMObject::ClassName.

void FSM::CFSMConditionTestVariable::SetCondition const char *    varName,
OP    testCondition,
int    testValue
 

Definition at line 74 of file FSMCondition.cpp.

bool FSM::CFSMConditionTestVariable::SetExpression const char *    expression
 

Definition at line 96 of file FSMCondition.cpp.

References SetParameter(), and value.

Referenced by SetParameter().

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

Definition at line 51 of file FSMObject.cpp.

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

Reimplemented from FSM::CFSMObject.

Definition at line 191 of file FSMCondition.cpp.

References condition, CRITICAL, EQUAL, FSM::CFSMObject::GetNameOfClass(), GREATER, GREATER_EQ, iThrow(), LESS, LESS_EQ, NEQUAL, SetExpression(), value, and variableName.

Referenced by SetExpression().


Friends And Related Function Documentation

friend class CFiniteStateMachine [friend]
 

Reimplemented from FSM::CFSMObject.

Definition at line 93 of file FSMCondition.h.

friend class CFSMTransition [friend]
 

Reimplemented from FSM::CFSMCondition.

Definition at line 92 of file FSMCondition.h.


Member Data Documentation

OP FSM::CFSMConditionTestVariable::condition [private]
 

Definition at line 130 of file FSMCondition.h.

Referenced by GetCondition(), and SetParameter().

int FSM::CFSMConditionTestVariable::value [private]
 

Definition at line 131 of file FSMCondition.h.

Referenced by CheckCondition(), GetValue(), SetExpression(), and SetParameter().

string FSM::CFSMConditionTestVariable::variableName [private]
 

Definition at line 129 of file FSMCondition.h.

Referenced by CheckCondition(), GetVariable(), and SetParameter().


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