appkit  1.5.1
RoadNarrows Robotics Application Kit
StateEventASym0 Class Reference

(2,3) Turing Machine's state A, symbol 0 event. More...

Inheritance diagram for StateEventASym0:

Public Member Functions

 StateEventASym0 ()
 Constuctor.
 
virtual ~StateEventASym0 ()
 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 A, symbol 0 event.

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

Member Function Documentation

virtual bool StateEventASym0::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 436 of file ut-sm.cxx.

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

Execute event action.

Print symbol 1, move right, enter state B.

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

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

References EventIdSymbol, and StateIdB.

453  {
454  ((State2_3Turing*)pState)->writeSymbol(EventIdSymbol[1]);
455  ((State2_3Turing*)pState)->moveHeadRight();
456  ((State2_3Turing*)pState)->showTape();
457  return StateIdB;
458  }
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: