Class CFSMTransition

FSMTransition is a class defined by event, condition(s), action(s) and next state(s) that could possibly be another FSM.

Currently, only one next state is defined, but multiple states could be employed to allow concurrent states within an operating FSM. (Not really a big deal, but of lower priority.)

See Also:
Header
Source
Method Summary
  CFSMTransition(CFSMStatePtr source)
           Void CFSMTransition constructor.
  ~CFSMTransition()
           CFSMTransition Deconstructor.
 CFSMTransitionPtr addAction(CFSMObject * base, FSMObjectFunction pObjectFcn, String name)
           Add raw void action, that if doesn't exist will be created and added to the end of the action list.
 CFSMTransitionPtr addAction(CFSMObject * base, FSMvoidFunction pVoidFcn, String name )
           Add raw fsmobject action, that if doesn't exist will be created and added to the end of the action list.
 CFSMTransitionPtr addAction(CFSMActionPtr action)
           Add action that transition executes at the end of the action list.
 CFSMTransitionPtr addCondition(CFSMConditionPtr condition)
           Add condition that transition executes at the end of the action list.
 bool evaluateCondition()
           Evaluate state condition(s) for this transition.
 CFSMActionPtrVector getActions()
           Get actions that transition executes (in order).
 CFSMConditionPtrVector getConditions()
           Get conditions that transition executes (in order).
 CFSMEventPtr getEvent()
           Get event that triggers transition.
 CFSMStatePtr getNextState()
           Get next state in transition.
 void releaseTransition()
          
 void setActions(CFSMActionPtrVector newactions)
           Set transition to execute new actions.
 void setConditions(CFSMConditionPtrVector newconditions)
           Set transition to execute new conditions.
 void setEvent(CFSMEventPtr newevent)
           Set transition to occur on new event.
 void setNextState(CFSMStatePtr newnext)
           Set transition to change to a new next state.
 
Methods in class CFSMObject
CFSMObject() String diagnostics() String getName() String getType() void setName(String aname)
 
Methods in class RefCount
RefCount(const RefCount& original) RefCount(void) ~RefCount() static String classInfo() void DecRef() void flagDelete(int i) String getType() size_t howMany() int IncRef()

Method Detail

CFSMTransition

 CFSMTransition(CFSMStatePtr source)
Void CFSMTransition constructor. Default is no type declaration.

~CFSMTransition

 ~CFSMTransition()
CFSMTransition Deconstructor. Release event, next and actions.

addAction

CFSMTransitionPtr addAction(CFSMObject * base, FSMObjectFunction pObjectFcn, String name)
Add raw void action, that if doesn't exist will be created and added to the end of the action list. If it exits, it too will be added, but just a reference to an existing action will be added. NOTE: It doesn't do this at this time, it just creates another action instance.
Returns:
transition pointer so that more actions, condition, etc. can be done to this transition.

addAction

CFSMTransitionPtr addAction(CFSMObject * base, FSMvoidFunction pVoidFcn, String name )
Add raw fsmobject action, that if doesn't exist will be created and added to the end of the action list. If it exits, it too will be added, but just a reference to an existing action will be added. NOTE: It doesn't do this at this time, it just creates another action instance.
Returns:
transition pointer so that more actions, condition, etc. can be done to this transition.

addAction

CFSMTransitionPtr addAction(CFSMActionPtr action)
Add action that transition executes at the end of the action list.

addCondition

CFSMTransitionPtr addCondition(CFSMConditionPtr condition)
Add condition that transition executes at the end of the action list.

evaluateCondition

bool evaluateCondition()
Evaluate state condition(s) for this transition. If no conditions, automatically return true.

getActions

CFSMActionPtrVector getActions()
Get actions that transition executes (in order).

getConditions

CFSMConditionPtrVector getConditions()
Get conditions that transition executes (in order).

getEvent

CFSMEventPtr getEvent()
Get event that triggers transition.

getNextState

CFSMStatePtr getNextState()
Get next state in transition.

releaseTransition

void releaseTransition()

setActions

void setActions(CFSMActionPtrVector newactions)
Set transition to execute new actions.

setConditions

void setConditions(CFSMConditionPtrVector newconditions)
Set transition to execute new conditions. FIXME: determine if all pointers are properly incremented.

setEvent

void setEvent(CFSMEventPtr newevent)
Set transition to occur on new event.

setNextState

void setNextState(CFSMStatePtr newnext)
Set transition to change to a new next state.

 Previous   Next