libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT > Class Template Reference

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
 
using rows_t = typename element_type::transition_table
 

Public Member Functions

constexpr machine () noexcept(true)=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(rows_t(std::forward< Arg >(arg), std::forward< Args >(args)...)))
 
constexpr machine (machine const &) noexcept(noexcept(rows_t(std::declval< rows_t >())))
 
template<class... Params>
constexpr end_states process (states s, Params &&...p) const noexcept(noexcept(std::declval< rows_t >().process(s, std::forward< Params >(p)...)))
 Call this method to perform your state transition from the start state to the next state. More...
 
template<class... Params>
constexpr end_states process (states s, Params &&...p) noexcept(noexcept(std::declval< rows_t >().process(s, std::forward< Params >(p)...)))
 Call this method to perform your state transition from the start state to the next state. More...
 

Detailed Description

template<class STT>
class jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >

Instantiate this object to use the created state-machine.

Definition at line 93 of file msm.hpp.

Member Typedef Documentation

◆ element_type

template<class STT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::element_type = STT

Definition at line 95 of file msm.hpp.

◆ end_states

template<class STT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::end_states = typename element_type::transition_table::end_states

Definition at line 97 of file msm.hpp.

◆ rows_t

template<class STT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::rows_t = typename element_type::transition_table

Definition at line 98 of file msm.hpp.

◆ states

template<class STT >
using jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::states = typename element_type::transition_table::states

Definition at line 96 of file msm.hpp.

Constructor & Destructor Documentation

◆ machine() [1/3]

template<class STT >
constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::machine ( )
constexprdefaultnoexcept

◆ machine() [2/3]

template<class STT >
template<class Arg , class... Args, class = typename std::enable_if<!std::is_convertible<Arg, machine>::value>::type>
constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::machine ( Arg &&  arg,
Args &&...  args 
)
inlineexplicitconstexprnoexcept

Definition at line 198 of file msm_impl.hpp.

◆ machine() [3/3]

template<class STT >
constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::machine ( machine< STT > const &  m)
inlineconstexprnoexcept

Definition at line 206 of file msm_impl.hpp.

Member Function Documentation

◆ process() [1/2]

template<class STT >
template<class... Params>
constexpr unroll::machine< STT >::end_states jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::process ( states  s,
Params &&...  p 
) const
inlineconstexprnoexcept

Call this method to perform your state transition from the start state to the next state.

Algorithmic complexity: see comment for state_transition_table::rows, above.

Parameters
sThe 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.
pThe parameters to pass to the event selected by the start state from the state_transition_table.
Returns
The resultant state of the row selected by the input state, s. If the row was a guard-row, then if the guard permitted it the resultant state, otherwise the input state, s.

Definition at line 212 of file msm_impl.hpp.

◆ process() [2/2]

template<class STT >
template<class... Params>
constexpr unroll::machine< STT >::end_states jmmcg::LIBJMMCG_VER_NAMESPACE::msm::unroll::machine< STT >::process ( states  s,
Params &&...  p 
)
inlineconstexprnoexcept

Call this method to perform your state transition from the start state to the next state.

Algorithmic complexity: see comment for rows, above.

Parameters
sThe 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.
pThe parameters to pass to the event selected by the start state from the state_transition_table.
Returns
The resultant state of the row selected by the input state, s. If the row was a guard-row, then if the guard permitted it the resultant state, otherwise the input state, s.

Definition at line 218 of file msm_impl.hpp.


The documentation for this class was generated from the following files: