tree_builders library
Provides support for defining state trees.
Classes
-
Channel<
P> -
Indicates that a value of type
Pmust be provided when entering a state. - DotFormatter
- Generates a description of a StateTreeBuilder in Graphviz DOT graph format.
-
EnterStateBuilder<
D> -
Provides methods for describing the behavior of a state, carrying state data of type
D, when is entered.Dmay bevoidif the state does not have any associated state data. - InitialChild
- Describes the initial child state of a parent state.
-
InitialData<
D> -
Describes the initial value for a StateTreeBuilder.dataState that carries a value of type
D. - InitialMachine
- Describes the initial state machine of a StateTreeBuilder.machineState.
-
MachineDoneHandlerBuilder<
C> - Provides methods for describing how a StateTreeBuilder.machineState behaves when its nested state machine completes.
-
MachineDoneWhenBuilder<
C> - Provides methods for defining conditional behavior of a StateTreeBuilder.machineState, when the nested state machine completes.
-
MachineDoneWhenResultBuilder<
C, T> -
Provides methods for error handling behavior for a StateTreeBuilder.machineState carrying
context value of type
C, when a nested state machine has completted, and when aResultis an error value. - MachineStateBuilder
- Provides methods for describing the transition from a StateTreeBuilder.machineState that occurs when the nested state machine completes.
-
MessageActionBuilder<
M, D, C> - Provides methods for describing actions that can be taken while a state handles a message.
-
MessageHandlerBuilder<
M, D, C> -
Provides methods for describing how a state, carrying state data of type
D, behaves in response to a message of typeM. -
MessageHandlerContext<
M, D, C> -
Provides access to the context for a message handler, including the MessageContext, the
message of type
Mbeing processed, the state data of typeD, and a context value of typeC. -
MessageHandlerWhenBuilder<
M, D, C> -
Provides methods for defining conditional message handling behavior for messages of type
M, for a state carrying state data typeD, and a context value of typeC. -
MessageHandlerWhenResultBuilder<
M, D, C, T> -
Provides methods for error handling behavior for a state carrying state data
of type
Dand a context value of typeC, when aResultis an error value. -
StateBuilder<
D> -
Provides methods for describing the behavior of a state carrying state data of type
D.Dmay bevoidif the state does not have any associated state data. - StateTreeBuilder
- Provides methods to describe a state tree.
- StateTreeFormatter
- Defines methods for writing a textual description of the state tree represented by a StateTreeBuilder.
-
TransitionHandlerBuilder<
D, C> - Provides methods for describing how a state behaves during a transition.
-
TransitionHandlerContext<
D, C> - Provides access to the context for a transition handler, including the transitionContext, the state data, and a context value.
-
TransitionHandlerWhenBuilder<
D, C> -
Provides methods for defining conditional transition behavior for a state carrying state data
of type
D, and a context value of typeC. -
TransitionHandlerWhenResultBuilder<
D> -
Provides methods for error handling behavior for a state carrying state data
of type
D, when aResultis an error value. - TreeBuildContext
- Provides contextual information while a state tree is being constructed, and factory methods for creating tree nodes.
Enums
- ActionResult
- Describes the message processing result of runnin an action with MessageHandlerBuilder.action.
Functions
-
emptyFinalState<
D> (EnterStateBuilder< D> builder) → void - A state builder callback that adds no behavior to a final state.
-
emptyState<
D> (StateBuilder< D> builder) → void - A state builder callback that adds no behavior to a state.