Horizon
Loading...
Searching...
No Matches
src
pool
entity.hpp
1
#pragma once
2
#include "gate.hpp"
3
#include "nlohmann/json_fwd.hpp"
4
#include "unit.hpp"
5
#include "util/uuid.hpp"
6
#include <map>
7
#include <set>
8
#include "util/file_version.hpp"
9
10
namespace
horizon {
11
using
json
=
nlohmann::json
;
12
13
class
Entity
{
14
private
:
15
Entity
(
const
UUID
&uu,
const
json
&,
class
IPool
&pool);
16
17
public
:
18
Entity
(
const
UUID
&uu);
19
20
static
Entity
new_from_file(
const
std::string &filename,
IPool
&pool);
21
static
unsigned
int
get_app_version();
22
UUID
uuid;
23
std::string name;
24
std::string manufacturer;
25
std::string prefix;
26
std::set<std::string> tags;
27
std::map<UUID, Gate> gates;
28
29
FileVersion
version;
30
json
serialize()
const
;
31
void
update_refs(
IPool
&pool);
32
UUID
get_uuid()
const
;
33
};
34
}
// namespace horizon
horizon::Entity
Definition
entity.hpp:13
horizon::FileVersion
Definition
file_version.hpp:9
horizon::IPool
Definition
ipool.hpp:15
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition
uuid.hpp:16
nlohmann::basic_json
a class to store JSON values
Definition
json.hpp:177
nlohmann::json
basic_json<> json
default JSON class
Definition
json_fwd.hpp:62
Generated by
1.9.8