Maki
|
maki::machine
configuration
More...
#include <maki/machine_conf.hpp>
Public Types | |
using | context_type = typename Impl::context_type |
Public Member Functions | |
machine_conf (const machine_conf &)=delete | |
machine_conf (machine_conf &&)=delete | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | auto_start (const bool value) const |
Specifies whether the constructor of maki::machine must call maki::machine::start() . | |
template<class Callable> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | catch_mx (const Callable &callable) const |
Sets up a try /catch(...) block at the top-level of every non-const member function of maki::machine and invokes callable from the catch block. | |
template<class Context> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | context_a () const |
Sets the type of the context (see signatures). | |
template<class Context> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | context_am () const |
Sets the type of the context (see signatures). | |
machine_conf & | operator= (const machine_conf &)=delete |
machine_conf & | operator= (machine_conf &&)=delete |
template<class Hook> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | post_external_transition_hook_crset (const Hook &hook) const |
Specifies a hook to be called after any external transition. | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | post_processing_hook_mep (const Action &action) const |
Adds a hook to be called whenever maki::machine is done processing an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | post_processing_hook_mep (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook to be called whenever maki::machine is done processing an event whose type is part of evt_set . | |
template<class Hook> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_external_transition_hook_crset (const Hook &hook) const |
Specifies a hook to be called before any external transition. | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_c (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_c (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_ce (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_ce (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_cm (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_cm (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_cme (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_cme (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_e (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_e (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_m (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_m (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_me (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_me (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
template<class Event, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_v (const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event of type Event . | |
template<class EventSetPredicate, class Action> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | pre_processing_hook_v (const event_set< EventSetPredicate > &evt_set, const Action &action) const |
Adds a hook (see signatures) to be called whenever maki::machine is about to process an event whose type is part of evt_set . | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | process_event_now_enabled (const bool value) const |
Specifies whether the unsafe function maki::machine::process_event_now() can be called. | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | run_to_completion (const bool value) const |
Specifies whether run-to-completion is enabled. | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | small_event_max_align (const std::size_t value) const |
Specifies the maximum object alignment requirement for the run-to-completion event queue to enable small object optimization (and thus avoid an extra memory allocation). | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | small_event_max_size (const std::size_t value) const |
Specifies the maximum object size for the run-to-completion event queue to enable small object optimization (and thus avoid an extra memory allocation). | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | thread_safe (const bool) const |
Currently doesn't do anything. Once thread safety is implemented, will specify whether thread safety is enabled. | |
template<class... TransitionTables> | |
constexpr machine_conf< IMPLEMENTATION_DETAIL > | transition_tables (const TransitionTables &... tables) const |
Specifies the list of transition tables. One region per transition table is created. | |
maki::machine
configuration
Impl | implementation detail |
|
nodiscardconstexpr |
Sets up a try
/catch(...)
block at the top-level of every non-const
member function of maki::machine
and invokes callable
from the catch
block.
As the suffix of the function suggests, callable
must take references to:
Example:
If this action isn't set, maki::machine
doesn't catch any exception.
|
nodiscardconstexpr |
Specifies a hook to be called after any external transition.
Hook must have the following form:
This hook can be useful for logging external transitions, for example:
|
nodiscardconstexpr |
Adds a hook to be called whenever maki::machine
is done processing an event of type Event
.
Hook must have the following form:
The processed
parameter indicates whether a state transition or any kind of action invocation (note: a hook isn't an action) occurred during the processing of the event.
Users typically add a hook for every event of interest.
Example:
|
nodiscardconstexpr |
Adds a hook to be called whenever maki::machine
is done processing an event whose type is part of evt_set
.
Hook must have the following form:
The processed
parameter indicates whether a state transition or any kind of action invocation (note: a hook isn't an action) occurred during the processing of the event.
Users typically add a hook for every event of interest.
Example:
|
nodiscardconstexpr |
Specifies a hook to be called before any external transition.
Hook must have the following form:
This hook can be useful for logging external transitions, for example:
|
nodiscardconstexpr |
Specifies whether run-to-completion is enabled.
Disabling run-to-completion makes the state machine much faster, but you have to make sure you never call maki::machine::process_event()
recursively.
Disable it at your own risk!
|
nodiscardconstexpr |
Currently doesn't do anything. Once thread safety is implemented, will specify whether thread safety is enabled.
Being a safety option, it will be enabled by default.