appkit  1.5.1
RoadNarrows Robotics Application Kit
StateEventBSym1 Class Reference

(2,3) Turing Machine's state B, symbol 1 event. More...

Inheritance diagram for StateEventBSym1:

Public Member Functions

 StateEventBSym1 ()
 Constuctor.
 
virtual ~StateEventBSym1 ()
 Destructor.
 
virtual bool evalGuardExpr (State *pState, int nPrevStateId, int nEventId)
 Evaluate event guard condition. More...
 
virtual int execAction (State *pState, int nPrevStateId, int nEventId)
 Execute event action. More...
 

Detailed Description

(2,3) Turing Machine's state B, symbol 1 event.

Definition at line 655 of file ut-sm.cxx.

Member Function Documentation

virtual bool StateEventBSym1::evalGuardExpr ( State *  pState,
int  nPrevStateId,
int  nEventId 
)
inlinevirtual

Evaluate event guard condition.

Parameters
pStateAssociated state.
nPrevStateIdPrevious state id.
nEventIdReceived event id.
Returns
Returns true if event is accepted, otherwise returns false.

Definition at line 673 of file ut-sm.cxx.

674  {
675  return ((State2_3Turing*)pState)->Head < 79? true: false;
676  }
The (2,3) Turing state base class.
Definition: ut-sm.cxx:239
virtual int StateEventBSym1::execAction ( State *  pState,
int  nPrevStateId,
int  nEventId 
)
inlinevirtual

Execute event action.

Print symbol 2, move right, stay in state B.

Parameters
pStateState owning this event.
nPrevStateIdPrevious state id.
nEventIdEvent id.
Returns
Next state id.

Definition at line 689 of file ut-sm.cxx.

References EventIdSymbol, and StateIdB.

690  {
691  ((State2_3Turing*)pState)->writeSymbol(EventIdSymbol[2]);
692  ((State2_3Turing*)pState)->moveHeadRight();
693  ((State2_3Turing*)pState)->showTape();
694  return StateIdB;
695  }
static const int StateIdB
state B
Definition: ut-sm.cxx:82
The (2,3) Turing state base class.
Definition: ut-sm.cxx:239
static const int EventIdSymbol[]
tape symbol event ids
Definition: ut-sm.cxx:88

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