StateMachine


Description:

[ CCode ( has_construct_function = false ) ]
protected StateMachine ()

Creates a new [class@Dex.

StateMachine].

The transition table is copied and validated before the state machine is returned. Each transition must have a valid from state, valid to state, and non-null callback. Duplicate edges are rejected.

Parameters:

initial_state

the initial state value

n_transitions

the number of transition entries

scheduler

scheduler to spawn transition fibers on, or null for the thread default

stack_size

stack size for transition fibers, or zero to use the default

state_enum_type

a `GType` for a `GEnum`

transitions

transition entries

user_data

user data for transition callbacks

user_data_destroy

destroy notify for user_data

Returns:

a new [class@Dex.StateMachine]