Fsm

A state machine derived from the types it is based on.

Each state have its unique, temporary data that it works on. If a state needs persistent data then look into using the TypeDataMap.

The state transitions are calculated by next and the actions are performed by act.

See the unittests for example of how to use the implementation.

Members

Aliases

LogFn
alias LogFn = void delegate(string msg) @(safe)

Log messages of the last state transition (next). Only updated in debug build.

StateT
alias StateT = sumtype.SumType!StateTT
Undocumented in source.

Static functions

opCall
StateT opCall(T a)

Helper function to convert the return type to StateT.

Variables

logger
LogFn logger;
Undocumented in source.
state
StateT state;

The states and state specific data.

Meta