libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
Instantiate this object to use the created state-machine. More...
#include <msm.hpp>
Public Types | |
using | element_type = STT |
using | states = typename element_type::transition_table::states |
using | end_states = typename element_type::transition_table::end_states |
Public Member Functions | |
constexpr | machine ()=default |
template<class Arg , class... Args, class = typename std::enable_if<!std::is_convertible<Arg, machine>::value>::type> | |
constexpr | machine (Arg &&arg, Args &&...args) noexcept(noexcept(states_to_actions_table_t(std::forward< Arg >(arg), std::forward< Args >(args)...))) |
constexpr | machine (machine const &) noexcept(noexcept(states_to_actions_table_t(std::declval< states_to_actions_table_t >()))) |
template<class Params > | |
end_states | process (states s, Params &p) const noexcept(noexcept(std::declval< states_to_actions_table_t >()[s].process(reinterpret_cast< void * >(&p)))) |
Call this method to perform your state transition from the start state to the next state. More... | |
template<class Params > | |
end_states | process (states s, Params &p) noexcept(noexcept(std::declval< states_to_actions_table_t >()[s].process(reinterpret_cast< void * >(&p)))) |
Call this method to perform your state transition from the start state to the next state. More... | |
Instantiate this object to use the created state-machine.
using jmmcg::LIBJMMCG_VER_NAMESPACE::msm::hash::machine< STT >::element_type = STT |
using jmmcg::LIBJMMCG_VER_NAMESPACE::msm::hash::machine< STT >::end_states = typename element_type::transition_table::end_states |
using jmmcg::LIBJMMCG_VER_NAMESPACE::msm::hash::machine< STT >::states = typename element_type::transition_table::states |
|
constexprdefault |
|
inlineexplicitconstexprnoexcept |
Definition at line 918 of file msm_impl.hpp.
|
inlineconstexprnoexcept |
Definition at line 924 of file msm_impl.hpp.
|
inlinenoexcept |
Call this method to perform your state transition from the start state to the next state.
Algorithmic complexity: O(1) where n is the number of entries in the meta-state table with a small constant. This is thread-safe (thus re-entrant) only if all of the called actions are.
s | The start state for the transition to be selected. If s is not found in the state_transition_table, then there is no effect, nothing happens. |
p | The parameters to pass to the event selected by the start state from the state_transition_table. Note that the events must have a member-using called argument_type that specifies this type, otherwise there will be a compile-time error. |
Definition at line 930 of file msm_impl.hpp.
|
inlinenoexcept |
Call this method to perform your state transition from the start state to the next state.
Algorithmic complexity: O(1) where n is the number of entries in the meta-state table with a small constant. This is thread-safe (thus re-entrant) only if all of the called actions are.
s | The start state for the transition to be selected. If s is not found in the state_transition_table, then there is no effect, nothing happens. |
p | The parameters to pass to the event selected by the start state from the state_transition_table. Note that the events must have a member-using called argument_type that specifies this type, otherwise there will be a compile-time error. |
Definition at line 940 of file msm_impl.hpp.