|
fsm
|
This file contains the definition of the state class and related helper templates. More...


Go to the source code of this file.
Variables | |
| template<class T > | |
| constexpr bool | escad::new_fsm::detail::has_onEnter_v = has_onEnter<T>::value |
| Helper helper template to access the value of has_onEnter. More... | |
| template<class T , class E > | |
| constexpr bool | escad::new_fsm::detail::has_onEnterWithEvent_v |
| Helper helper template to access the value of has_onEnterWithEvent. More... | |
| template<class T > | |
| constexpr bool | escad::new_fsm::detail::has_onExit_v = has_onExit<T>::value |
| template<class T , class E > | |
| constexpr bool | escad::new_fsm::detail::has_transitionTo_v = has_transitionTo<T, E>::value |
| Helper helper template to access the value of has_transitionTo. More... | |
| template<class T > | |
| constexpr bool | escad::new_fsm::detail::has_transitionInternalTo_v |
This file contains the definition of the state class and related helper templates.
Defines the state class and helper templates for state management in a finite state machine.
The state class is a CRTP (Curiously Recurring Template Pattern) base class for states in a finite state machine. It provides methods for handling state entry, event dispatching, and state transitions. The helper templates in this file are used for detecting if a state has specific methods, such as onEnter() and transitionTo(). This file is part of the FSM (Finite State Machine) library.
This file contains the implementation of the state class, which is a CRTP (Curiously Recurring Template Pattern) base class for states in a finite state machine. It also includes helper templates for detecting the presence of certain methods in derived state classes.
The state class provides methods for handling state entry, event dispatching, and state transitions. It uses SFINAE (Substitution Failure Is Not An Error) and type traits to conditionally call methods based on their existence in the derived state class.
The helper templates in the details namespace are used to detect the presence of the following methods in the derived state class:
The state class also includes a handle_result() method for handling the result of state transitions and a dispatch() method for dispatching events to the state.
This file is part of the new_fsm namespace.
|
inline |
Helper helper template to access the value of has_onEnter.
| T | The type to check for the presence of onEnter() method. |
|
inline |
Helper helper template to access the value of has_onEnterWithEvent.
| T | The type to check for the presence of onEnter(const Event &) method. |
| E | The event type. |
|
inline |
|
inline |
Helper helper template to access the value of has_transitionTo.
| T | The type to check for the presence of transitionTo(const Event &) method. |
| E | The event type. |
1.8.13