CreateStateTransitorPolicy

Default Policy of StateTransitor

template CreateStateTransitorPolicy (
State_
Event_
State_ defaultStateParameter_ = State_.init
ProcHandler_ = void delegate(
)[]
ExceptionHandler_ = void delegate(
Exception
)[]
EventHandler_ = void delegate(
Event_
)[]
StateChangedHandler_ = void delegate(
State_ newSts
,
State_ oldSts
)[]
ConsumeMode consumeMode_ = ConsumeMode.combined
EventContainer_ = SList!Event_
) {
enum State_ defaultStateParameter;
enum ConsumeMode consumeMode;
}

Examples

1 enum MyState { a }
2 enum MyEvent { a }
3 alias ST1 = StateTransitor!(MyState, MyEvent);
4 alias Policy2 = CreateStateTransitorPolicy!(MyState, MyEvent);
5 alias ST2 = StateTransitor!Policy2;
6 struct Policy3
7 {
8 	alias State = MyState;
9 	alias Event = MyEvent;
10 }
11 alias ST3 = StateTransitor!Policy3;
12 static assert(is(ST1 == ST2));
13 static assert(is(ST1 == ST3));

Meta