state_machine_cpp
state_any.h
Go to the documentation of this file.
1
//
2
// Created by henri on 27/04/21.
3
//
4
5
#ifndef STATE_MACHINE_CPP_STATE_ANY_H
6
#define STATE_MACHINE_CPP_STATE_ANY_H
7
8
#include "
state_instance.h
"
9
10
namespace
state_machine_cpp
{
11
template
<
class
>
class
hash;
12
13
namespace
State {
14
class
Any;
15
}
16
}
17
18
19
class
state_machine_cpp::State::Any
{
20
State::Instance
m_instance;
21
bool
m_is_instantiated;
22
23
bool
is_instantiated()
const
{
return
m_is_instantiated; }
24
const
State::Instance
& as_provided()
const
{
return
m_instance; }
25
State::Instance
instantiate(
unsigned
int
t_layer)
const
;
26
public
:
27
Any
(
const
State::Id
& t_id)
// NOLINT(google-explicit-constructor)
28
: m_instance(t_id), m_is_instantiated(false) {}
29
Any
(
const
State::Instance
& t_instance)
// NOLINT(google-explicit-constructor)
30
: m_instance(t_instance), m_is_instantiated(true) {}
31
32
State::Instance
as_instance
(
unsigned
int
t_layer_if_not_set)
const
;
33
};
34
35
36
#endif //STATE_MACHINE_CPP_STATE_ANY_H
state_machine_cpp::State::Any::Any
Any(const State::Id &t_id)
Definition:
state_any.h:27
state_machine_cpp::State::Id
Definition:
state_id.h:23
state_machine_cpp::State::Any
Definition:
state_any.h:19
state_instance.h
state_machine_cpp::State::Instance
Definition:
state_instance.h:23
state_machine_cpp
Definition:
algorithm.h:14
state_machine_cpp::State::Any::Any
Any(const State::Instance &t_instance)
Definition:
state_any.h:29
state_machine_cpp::State::Any::as_instance
State::Instance as_instance(unsigned int t_layer_if_not_set) const
state_machine_cpp
include
states
state_any.h
Generated by
1.8.17