| Package | wk.automaton |
| Class | public class WK_Automaton |
| Inheritance | WK_Automaton flash.events.EventDispatcher |
| Implements | WKI_Automaton |
| Subclasses | WK_MealyMachine, WK_MealyMachineSimplified, WK_MooreMachine, WK_MooreMachineSimplified |
| Language Version : | ActionScript 3.0 |
doAction
should be overridden by subclasses.
| Property | Defined By | ||
|---|---|---|---|
| transitionFunction : Object The transition function of the automaton (stored within a hash map). | WK_Automaton | ||
| Property | Defined By | ||
|---|---|---|---|
| currentState : String The current state of the automaton. | WK_Automaton | ||
| initialState : String The initial state of the automaton. | WK_Automaton | ||
| Method | Defined By | ||
|---|---|---|---|
WK_Automaton(p_initial_state:String) | WK_Automaton | ||
doAction(p_action:String):void
Switches the automaton into a new state depending on the current state
and the user action p_action. | WK_Automaton | ||
reset():void
Resets the automaton. | WK_Automaton | ||
| Constant | Defined By | ||
|---|---|---|---|
| DEFAULT : String = DEFAULT [static] | WK_Automaton | ||
| currentState | property |
protected var currentState:StringThe current state of the automaton.
| initialState | property |
protected var initialState:StringThe initial state of the automaton.
| transitionFunction | property |
transitionFunction:ObjectThe transition function of the automaton (stored within a hash map).
public function get transitionFunction():Object public function set transitionFunction(value:Object):void| WK_Automaton | () | Constructor |
public function WK_Automaton(p_initial_state:String)Parameters
p_initial_state:String — state The initial state of the automaton.
|
| doAction | () | method |
public function doAction(p_action:String):void
Switches the automaton into a new state depending on the current state
and the user action p_action. Several
WK_AutomatonEvents may be dispatched.
Parameters
p_action:String — The (user) action that determines
the transition to be used.
|
| reset | () | method |
public function reset():void
Resets the automaton. That is to say, the current state is
set to the initial state, an an event of type
WK_Automaton.INIT is dispatched. As parameters,
EventINIT (as action), the current state and an empty string
(for the previous state) are stored in that event.
| DEFAULT | Constant |
protected static const DEFAULT:String = DEFAULT