StateMachine
Loading...
Searching...
No Matches
StateMachine3.hpp File Reference
#include <algorithm>
#include <functional>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

class  state_machine_t< state_t, event_t >
 

Typedefs

using guard_t = std::function< bool()>
 
using action_t = std::function< void()>
 
using enter_action_t = std::function< void()>
 
using leave_action_t = std::function< void()>
 
template<typename state_t >
using enter_actions_t = std::unordered_map< state_t, enter_action_t >
 
template<typename state_t >
using leave_actions_t = std::unordered_map< state_t, leave_action_t >
 
template<typename state_t , typename event_t >
using transition_t = std::pair< std::pair< state_t, event_t >, std::tuple< guard_t, action_t, state_t > >
 
template<typename state_t , typename event_t >
using transition_table_t = std::vector< transition_t< state_t, event_t > >
 

Typedef Documentation

◆ action_t

using action_t = std::function<void()>

◆ enter_action_t

using enter_action_t = std::function<void()>

◆ enter_actions_t

template<typename state_t >
using enter_actions_t = std::unordered_map<state_t, enter_action_t>

◆ guard_t

using guard_t = std::function<bool()>

◆ leave_action_t

using leave_action_t = std::function<void()>

◆ leave_actions_t

template<typename state_t >
using leave_actions_t = std::unordered_map<state_t, leave_action_t>

◆ transition_t

template<typename state_t , typename event_t >
using transition_t = std::pair<std::pair<state_t, event_t>, std::tuple<guard_t, action_t, state_t> >

◆ transition_table_t

template<typename state_t , typename event_t >
using transition_table_t = std::vector<transition_t<state_t, event_t> >