appkit  1.5.1
RoadNarrows Robotics Application Kit
StateEventASym1 Class Reference

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

Inheritance diagram for StateEventASym1:

Public Member Functions

 StateEventASym1 ()
 Constuctor.
 
virtual ~StateEventASym1 ()
 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 1 event.

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

Member Function Documentation

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

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

Execute event action.

Print symbol 2, move left, stay in state A.

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

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

References EventIdSymbol, and StateIdA.

499  {
500  ((State2_3Turing*)pState)->writeSymbol(EventIdSymbol[2]);
501  ((State2_3Turing*)pState)->moveHeadLeft();
502  ((State2_3Turing*)pState)->showTape();
503  return StateIdA;
504  }
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: