View Source Protean.Machinery (Protean v0.1.0-alpha.1)
Purely-functional statechart core based on the SCXML specification.
Provides the underlying state-transition logic for a statechart, primarily through
transition/3
, a higher-level transition API for using %Protean.Machine{}
apart from the
interpreter provided by Protean, and take_transitions/3
, a lower-level API used by a
statechart interpreter.
It is uncommon to use this module independently of the Protean
behaviour.
Link to this section Summary
Functions
Select any machine transitions that apply to the given event in the current context.
Transition in response to an event.
Link to this section Functions
Link to this function
select_transitions(config, context, event, attribute \\ :transitions)
View SourceSelect any machine transitions that apply to the given event in the current context.
@spec take_transitions(Protean.MachineConfig.t(), Protean.Context.t(), [ Protean.Transition.t() ]) :: Protean.Context.t()
@spec transition(Protean.MachineConfig.t(), Protean.Context.t(), Protean.event()) :: Protean.Context.t()
Transition in response to an event.