SimpleHsm::SimpleHsm Class Reference

Inheritance diagram for SimpleHsm::SimpleHsm:

Calc::CalcHsm Oven::Oven

List of all members.

Public Member Functions

void SignalCurrentState (StateEvent e)

Protected Member Functions

void Initialize (StateDelegate topState)
Boolean IsParent (StateDelegate parentState, StateDelegate childState)
bool HasDeepHistAttrib (StateDelegate state)
void TransitionState (StateDelegate newState, bool toDeepHist)
void TransitionState (StateDelegate newState)
void InitTransitionState (StateDelegate newState)
Boolean IsInState (StateDelegate state)


Detailed Description

SimpleHsm class

The basic state machine implementation. This class should be subclassed to create a state machine.


Member Function Documentation

bool SimpleHsm::SimpleHsm::HasDeepHistAttrib ( StateDelegate  state  )  [inline, protected]

Check if a state delegates method has the DeepHistory attribute

Parameters:
state The state to check
Returns:
True if the method refered to by the delegate has the DeepHistory attribute

void SimpleHsm::SimpleHsm::Initialize ( StateDelegate  topState  )  [inline, protected]

Initialise a simplehsm state machine.

Parameters:
topState The topmost (and initial) state of the hierarchy

void SimpleHsm::SimpleHsm::InitTransitionState ( StateDelegate  newState  )  [inline, protected]

Initiate an initial transition to a new state (this function should only be used from a SimpleHsm::Signal::Init state event).

Parameters:
newState The state to transition to

Boolean SimpleHsm::SimpleHsm::IsInState ( StateDelegate  state  )  [inline, protected]

Check if a state machine is currently in a certain state.

Parameters:
state The state to check
Returns:
True if the state machine is currently in the specified state

Boolean SimpleHsm::SimpleHsm::IsParent ( StateDelegate  parentState,
StateDelegate  childState 
) [inline, protected]

Check is one state is the parent of another.

Parameters:
parentState The parent state to check
childState The child state to check
Returns:
True if the parentState parameter is a parent to the childState parameter

void SimpleHsm::SimpleHsm::SignalCurrentState ( StateEvent  e  )  [inline]

Send a signal to the state machine.

Parameters:
e The event to send to the state machine

void SimpleHsm::SimpleHsm::TransitionState ( StateDelegate  newState  )  [inline, protected]

Initiate a transition to a new state.

Parameters:
newState The state to transition to

void SimpleHsm::SimpleHsm::TransitionState ( StateDelegate  newState,
bool  toDeepHist 
) [inline, protected]

Initiate a transition to a new state.

This function will:

  • replace the target state with the deep history target if required
  • store a deep history target state if exiting a composite state with a deep history child
  • perform the exit/entry chain from the current state to the target state

Parameters:
newState The state to transition to
toDeepHist Whether to transition to the states internal deep history psuedostate


The documentation for this class was generated from the following file:

Generated on Thu Feb 4 09:29:13 2010 for simplehsm(C#) by  doxygen 1.5.9