public class MacroStateCtx<E,C,IN,E2,C2> extends StateCtx<E,C,IN>
StateCtx.onLand(IN, C, E) is called on the state,
StateMachine.start(Object) is triggered on the inner machine
2. Upon StateCtx.onReturn(IN, C) is called on the state,
StateMachine.run(Object) is triggered on the inner machine
3. Upon StateCtx.onLeave(IN, C, E) is called on the state, the inner machine
is terminated.
4. Upon StateCtx.onStop(boolean) is called on the state,
StateMachine.onStop(boolean) is triggered on the inner machineStateCtx.TransitionListener<IN,C>| Modifier and Type | Field and Description |
|---|---|
protected StateMachine<E2,C2,IN> |
_submachine |
_machine, _minorReturners, _minorTransitionListeners, _minorTransitions, _returnAll, _returners, _transitionListeners, _transitions| Constructor and Description |
|---|
MacroStateCtx(StateMachine<E2,C2,IN> submachine)
Construct a macro state, which consists of a state machine by itself.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
onLand(IN input,
C inputClass,
E origin)
This method is called when the machine enters this state
|
protected void |
onLeave(IN input,
C inputClass,
E destination)
This method is called when the machine leaves this state
|
protected void |
onReturn(IN input,
C inputClass)
This method is called when the machine returns to the same state
|
protected void |
onStop(boolean endOfInput)
This method is called when the machine stops on this state
|
addMinorRoute, addMinorRoute, addMinorRoutes, addMinorRoutes, addMinorTransition, addMinorTransition, addMinorTransitions, addMinorTransitions, addReturningClasses, addReturningClasses, addReturningInputs, addReturningInputs, addRoute, addRoute, addRoutes, addRoutes, addTransition, addTransition, addTransitions, addTransitions, getDestination, init, isLeaving, isReturning, isReturningAll, onReject, setMaster, setReturningAllprotected final StateMachine<E2,C2,IN> _submachine
public MacroStateCtx(StateMachine<E2,C2,IN> submachine)
protected void onLand(IN input, C inputClass, E origin)
StateCtxprotected void onReturn(IN input, C inputClass)
StateCtxprotected void onLeave(IN input, C inputClass, E destination)
StateCtxCopyright © 2018. All rights reserved.