libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::msm::computed_goto::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(false)
 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(false)
 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::computed_goto::machine< STT >

Instantiate this object to use the created state-machine.

Definition at line 321 of file msm.hpp.

Member Typedef Documentation

◆ element_type

Definition at line 323 of file msm.hpp.

◆ end_states

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

Definition at line 325 of file msm.hpp.

◆ rows_t

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

Definition at line 326 of file msm.hpp.

◆ states

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

Definition at line 324 of file msm.hpp.

Constructor & Destructor Documentation

◆ machine() [1/3]

template<class STT >
constexpr jmmcg::LIBJMMCG_VER_NAMESPACE::msm::computed_goto::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::computed_goto::machine< STT >::machine ( Arg &&  arg,
Args &&...  args 
)
inlineexplicitconstexprnoexcept

Definition at line 712 of file msm_impl.hpp.

◆ machine() [3/3]

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

Definition at line 720 of file msm_impl.hpp.

Member Function Documentation

◆ process() [1/2]

template<class STT >
template<class... Params>
constexpr computed_goto::machine< STT >::end_states jmmcg::LIBJMMCG_VER_NAMESPACE::msm::computed_goto::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 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. The states must be uniformly, linearly, increasing in underlying value.
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 726 of file msm_impl.hpp.

◆ process() [2/2]

template<class STT >
template<class... Params>
constexpr computed_goto::machine< STT >::end_states jmmcg::LIBJMMCG_VER_NAMESPACE::msm::computed_goto::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. The states must be uniformly, linearly, increasing in underlying value.
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 739 of file msm_impl.hpp.


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