boost::msm::backmp11::state_machine

Back‐end for a state machine.

Synopsis

Declared in <boost/msm/backmp11/state_machine.hpp>

template<
    typename FrontEnd,
    typename Config = default_state_machine_config,
    typename Derived = no_derived>
class state_machine
    : public detail::state_machine_base<Config, detail::get_nesting_role<Config, mp11::mp_if_c<std::is_same_v<Derived, no_derived>, state_machine<FrontEnd, Config, Derived>, Derived>>()>
    , public FrontEnd

Description

Wraps a state machine front‐end into an executable state machine.

Base Classes

Name

Description

detail::state_machine_base<Config, detail::get_nesting_role<Config, mp11::mp_if_c<std::is_same_v<Derived, no_derived>, state_machine<FrontEnd, Config, Derived>, Derived>>()>

FrontEnd

Types

Name

Description

direct

Wrapper for a direct entry, which upper machines can use to connect to it.

entry_pt

Wrapper for a direct entry, which upper machines can use to connect to it.

exit_pt

Wrapper for an exit pseudostate, which upper machines can use to connect to it.

Type Aliases

Name

Description

config_t

Type of the configuration (same as Config, see state_machine_config).

context_t

Type of the context (see state_machine_config::context).

derived_t

Type of the derived machine (corresponds to Derived).

front_end_t

Type of the front‐end (same as FrontEnd).

observer_t

Type of the context (see state_machine_config::observer).

root_sm_t

Type of the root machine (see state_machine_config::root_sm).

states_t

Container with all contained states.

Member Functions

Name

Description

state_machine [constructor]

Copy constructor

state_machine [constructor]

Copy constructor

state_machine [constructor]

Move constructor

state_machine [constructor]

Constructs and forwards constructor arguments to the back‐end.

operator=

Copy assignment operator

operator=

Move assignment operator

defer_event

Puts the event into the event pool to process it in the next processing cycle.

enqueue_event

Puts the event into the event pool to process it in the same processing cycle.

get_active_state_ids

Returns the active state ids of the machine.

get_context

Gets the context of the state machine. See state_machine_config::context.

get_context

Gets the context of the state machine. See state_machine_config::context.

get_machine_state

Gets the current state of the state machine. See machine_state.

get_observer

Get the observer of the state machine. See state_machine_config::observer.

get_observer

Gets the observer of the state machine. See state_machine_config::observer.

get_root_sm

Gets the root machine. See state_machine_config::root_sm.

get_root_sm

Gets the root machine. See state_machine_config::root_sm.

get_state

Gets a state.

get_state

Gets a state.

is_contained

Checks if the sm is contained in another sm.

is_flag_active

Checks if a flag is active, using the BinaryOp (default flag_or) as folding function.

is_state_active

Checks whether a state is currently active.

process_event

Processes the event.

process_event_pool

Processes up to max_events from the event pool.

start

Starts the state machine with a starting event.

start

Starts the state machine with a custom event.

stop

Stops the state machine with a stopping event.

stop

Stops the state machine with a custom event.

visit

Visits the states (only active states, recursive).

visit

Visits the states (only active states, recursive).

visit

Visits the states with a visit_mode.

visit

Visits the states with a visit_mode.

Static Member Functions

Name

Description

get_state_id

Returns the id of a state.

get_state_id

Returns the id of a state.

Protected Type Aliases

Friends

Name

Description

boost::msm::backmp11::reflect

boost::msm::backmp11::reflect

boost::msm::backmp11::detail::deferred_event

boost::msm::backmp11::detail::event_occurrence

boost::msm::backmp11::detail::event_deferral_visitor

boost::msm::backmp11::detail::state_visitor_base_impl

boost::msm::backmp11::detail::compile_policy_impl

boost::msm::backmp11::detail::transition_table_impl

boost::msm::backmp11::detail::history_impl

boost::msm::backmp11::state_machine

Back‐end for a state machine.

Non-Member Functions

Name

Description

reflect

Reflects on a state_machine's members with a visitor.

reflect

Reflects on a state_machine's members with a visitor.

Created with MrDocs