cushion.core

Core module for state transion

Members

Enums

ConsumeMode
enum ConsumeMode

Consume mode

Functions

cancelEvent
void cancelEvent()
forbiddenHandler
void delegate() forbiddenHandler()

Get a default forbidden handler

ignoreHandler
void delegate() ignoreHandler()

Get a default ignore handler

Structs

StateTransitor
struct StateTransitor(StateType, EventType, StateType defaultStateParameter = StateType.init, ProcHandler = void delegate()[], ExceptionHandler = void delegate(Exception)[], EventHandler = void delegate(EventType)[], StateChangedHandler = void delegate(StateType newSts, StateType oldSts)[], ConsumeMode consumeMode = ConsumeMode.combined, EventContainer = SList!EventType)

StateTransitor

Templates

CreateStateTransitorPolicy
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_)

Default Policy of StateTransitor

StateTransitor
template StateTransitor(alias Policy)

StateTransitor

isEvent
template isEvent(Event)

Judge StateTransitor's Event

isEventContainer
template isEventContainer(Container)

Judge StateTransitor's EventContainer

isEventHandler
template isEventHandler(Handler, Event)

Judge StateTransitor's EventHandler

isExceptionHandler
template isExceptionHandler(Handler)

Judge StateTransitor's ExceptionHandler

isProcessHandler
template isProcessHandler(Handler)

Judge StateTransitor's ProcHandler

isState
template isState(State)

Judge StateTransitor's State

isStateChangedHandler
template isStateChangedHandler(Handler, State)

Judge StateTransitor's EventHandler

Meta