State Machine.
More...
|
| state_machine (logger_t custom_logger) |
| Constructor that allows to initialize a logger. More...
|
|
template<typename Event , typename... Args> |
void | event (Args &&... args) |
| Pass an event to a State Machine. More...
|
|
template<typename... Args> |
void | action (Args &&... args) |
| Calls a state action. More...
|
|
template<class Guard > |
void | guard () |
| Change current guard. More...
|
|
template<class Table, class Logger = empty_logger>
struct pure::state_machine< Table, Logger >
State Machine.
- Template Parameters
-
◆ state_machine()
template<class Table , class Logger = empty_logger>
Constructor that allows to initialize a logger.
If the user-defined logger needs some internal data initialization, user can define a template type of State Machine as a reference to a logger and pass a logger by reference; or pass it by value.
◆ action()
template<class Table , class Logger = empty_logger>
template<typename... Args>
Calls a state action.
- Template Parameters
-
Args... | variadic template type pack of arguments |
If the current state type is a functor and it is can be called with the given arguments, it will be called.
◆ event()
template<class Table , class Logger = empty_logger>
template<typename Event , typename... Args>
Pass an event to a State Machine.
- Template Parameters
-
Event | event |
Args... | variadic template type pack of arguments |
Input impact for State Machine. If the there is a transition, for which current state, current guard and an event are matched, the transition will be performed.
If the given event causes a transition, and this transition has an action, it will be called with the arguments Args...
.
◆ guard()
template<class Table , class Logger = empty_logger>
template<class Guard >
Change current guard.
- Template Parameters
-
The documentation for this struct was generated from the following file: