appkit  1.5.1
RoadNarrows Robotics Application Kit
StateEventBSym0 Class Reference

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

Inheritance diagram for StateEventBSym0:

Public Member Functions

 StateEventBSym0 ()
 Constuctor.
 
virtual ~StateEventBSym0 ()
 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 0 event.

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

Member Function Documentation

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

628  {
629  return ((State2_3Turing*)pState)->Head > 0? true: false;
630  }
The (2,3) Turing state base class.
Definition: ut-sm.cxx:239
virtual int StateEventBSym0::execAction ( State *  pState,
int  nPrevStateId,
int  nEventId 
)
inlinevirtual

Execute event action.

Print symbol 2, move left, enter state A.

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

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

References EventIdSymbol, and StateIdA.

644  {
645  ((State2_3Turing*)pState)->writeSymbol(EventIdSymbol[2]);
646  ((State2_3Turing*)pState)->moveHeadLeft();
647  ((State2_3Turing*)pState)->showTape();
648  return StateIdA;
649  }
static const int StateIdA
state A
Definition: ut-sm.cxx:81
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: