7#ifndef MAKI_REGION_STATE_HPP
8#define MAKI_REGION_STATE_HPP
10#include "detail/pretty_name.hpp"
11#include "detail/impl.hpp"
28#ifndef MAKI_DETAIL_DOXYGEN
29 template<
class... Args>
30 constexpr state(Args&&... args):
31 impl_(std::forward<Args>(args)...)
36 state(
const state&) =
delete;
37 state(state&&) =
delete;
38 state& operator=(
const state&) =
delete;
39 state& operator=(state&&) =
delete;
47 template<const auto& StateBuilder>
50 return impl_.template state<StateBuilder>();
58 [[nodiscard]]
const auto&
region()
const
67 template<const auto& StateBuilder>
68 [[nodiscard]]
bool is()
const
78 return impl_.context();
91 return detail::pretty_name<Impl::builder>();
95 using impl_type = Impl;
97 MAKI_DETAIL_FRIENDLY_IMPL
bool is() const
Returns whether the state created by StateBuilder is active. Only valid if state is composite and onl...
Definition state.hpp:68
const auto & substate() const
Returns the maki::state object created by StateBuilder (of type maki::state_builder)....
Definition state.hpp:48
const auto & context() const
Returns the context instantiated at construction.
Definition state.hpp:76
const auto & region() const
Returns the maki::region object at index Index. Only valid if state is composite.
Definition state.hpp:58
static std::string_view pretty_name()
The pretty name of the state.
Definition state.hpp:89