State Machine Factory
A StateMachineFactory enables a client to dynamically specify and assemble a finite state machine. In particular, the factory allows a client to flexibly define a particular FSM while ignoring specification and evaluation order dependency. Validation is postponed until final assembly time, at which time a ValidationException will be thrown in the event of incorrect or incomplete specification; otherwise, the constructed FSM provably reflects the client specification.
Author
Mark van Gulik
Todd L Smith
Parameters
The type of states (an Enum).
The type of events (an Enum).
The type of guard keys (an Enum).
The type of action keys (an Enum).
The type of memento.
The kind of states.
The kind of events.
The kind of guard keys.
The kind of action keys.
Constructors
Construct a new StateMachineFactory primed to create a new instance of the specified kind of state machine.
Functions
Add an automatically taken transition.
Create an instance of the finite state machine described by the StateMachineFactory.
Bind an action key to an action.
Bind a guard key to a guard.
Set the entry action key that indicates which action to invoke when entering the specified state.
Set the exit action key that indicates which action to invoke when exiting the specified state.
Record the canonical initial state of the target state machine.