PrintObserver<S, E> class
A default observer that prints machine activity to the console.
- Inheritance
-
- Object
- MachineObserver<
S, E> - PrintObserver
Constructors
- PrintObserver({String formatter(String) = _defaultFormatter})
-
Creates a new PrintObserver with an optional
formatter.const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onEventDeferred(
HsmState< S, E> state, E event, Object? data) → void -
Called when an event is deferred by a state.
override
-
onEventDropped(
HsmState< S, E> state, E event, Object? data) → void -
Called when a deferred event is dropped.
override
-
onEventError(
Machine< S, E> machine, E event, Object? data, Object error, StackTrace stackTrace) → void -
Called when an error occurs during event processing.
override
-
onEventHandled(
HsmState< S, E> state, E event, Object? data) → void -
Called when an event has been successfully handled.
override
-
onEventHandling(
Machine< S, E> machine, E event, Object? data) → void -
Called when the machine begins processing an event.
override
-
onEventQueued(
Machine< S, E> machine, E event, Object? data) → void -
Called when an event is added to the machine's event queue.
override
-
onEventUnhandled(
HsmState< S, E> state, E event, Object? data) → void -
Called when an event was not handled by any active state.
override
-
onInternalTransition(
HsmState< S, E> state, E? event, Object? data) → void -
Called when an internal transition (no state change) occurs.
override
-
onMachineStarted(
Machine< S, E> machine) → void -
Called when the machine has successfully started and entered its root state.
override
-
onMachineStarting(
Machine< S, E> machine) → void -
Called when the machine is starting.
override
-
onMachineStopped(
Machine< S, E> machine) → void -
Called when the machine has been stopped and all states have been exited.
override
-
onMachineTerminated(
Machine< S, E> machine) → void -
Called when the machine enters a
TerminateState.override -
onStateEnter(
HsmState< S, E> state) → void -
Called when a state is entered.
override
-
onStateExit(
HsmState< S, E> state) → void -
Called when a state is exited.
override
-
onTransition(
HsmState< S, E> source, HsmState<S, E> target, E? event, Object? data, TransitionKind kind) → void -
Called when a transition between two states occurs.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited