Interface IHsm<T, THsm, TState, TInputs>
- Namespace
- MarymoorStudios.Core.Fsm
- Assembly
- MarymoorStudios.Core.Fsm.dll
Defines required constraints for Hierarchical State Machines.
public interface IHsm<T, THsm, TState, TInputs> where THsm : Hsm<T, THsm, TState, TInputs>, IHsm<T, THsm, TState, TInputs> where TState : HsmState<T, THsm, TState, TInputs>, IHsmState<T, THsm, TState, TInputs>
Type Parameters
TThe data class for the state machine.
THsmThe class for the state machine itself.
TStateThe base-type for all states in the machine.
TInputsThe class that defines inputs to the machine.
Methods
Create(T, Action<HsmMeta<T, THsm, TState, TInputs>, TInputs, T>)
Creates a new context.
public static abstract THsm Create(T data, Action<HsmMeta<T, THsm, TState, TInputs>, TInputs, T> builder)
Parameters
Returns
- THsm
OnError(T, TState, ErrorScope, Exception)
Error input.
void OnError(T data, TState state, ErrorScope scope, Exception ex)
Parameters
dataTThe data.
stateTStateThe state the error occurred in.
scopeErrorScopeThe scope where the error occurred.
exExceptionThe error.