7#ifndef MAKI_REGION_STATE_HPP
8#define MAKI_REGION_STATE_HPP
10#include "detail/type_set.hpp"
11#include "detail/pretty_name.hpp"
12#include "detail/friendly_impl.hpp"
13#include "detail/tlu/left_fold.hpp"
30#ifndef MAKI_DETAIL_DOXYGEN
31 template<
class... Args>
32 constexpr state(Args&&... args):
33 impl_(std::forward<Args>(args)...)
38 state(
const state&) =
delete;
39 state(state&&) =
delete;
40 state& operator=(
const state&) =
delete;
41 state& operator=(state&&) =
delete;
49 template<const auto& StateMold>
52 return impl_.template state<StateMold>();
60 [[nodiscard]]
const auto&
region()
const
69 template<const auto& StateMold>
70 [[nodiscard]]
bool is()
const
80 return impl_.context();
93 return detail::pretty_name<Impl::mold>();
97 MAKI_DETAIL_FRIENDLY_IMPL
99 using impl_type = Impl;
106 template<
class EventTypeSet,
class State>
107 using state_type_list_event_type_set_operation_t = type_set_union_t
110 typename impl_of_t<State>::event_type_set
113 template<
class StateTypeList>
114 using state_type_list_event_type_set_t = tlu::left_fold_t
117 state_type_list_event_type_set_operation_t,
bool is() const
Returns whether the state created by StateMold is active. Only valid if state is composite and only m...
Definition state.hpp:70
const auto & substate() const
Returns the maki::state object created by StateMold (of type maki::state_mold). Only valid if state i...
Definition state.hpp:50
const auto & context() const
Returns the context instantiated at construction.
Definition state.hpp:78
const auto & region() const
Returns the maki::region object at index Index. Only valid if state is composite.
Definition state.hpp:60
static std::string_view pretty_name()
The pretty name of the state.
Definition state.hpp:91