Horizon
src
block
bus.hpp
1
#pragma once
2
#include "nlohmann/json_fwd.hpp"
3
#include "net.hpp"
4
#include "pool/unit.hpp"
5
#include "util/uuid.hpp"
6
#include "util/uuid_ptr.hpp"
7
#include <deque>
8
#include <fstream>
9
#include <map>
10
11
namespace
horizon {
12
using
json
=
nlohmann::json
;
13
20
class
Bus {
21
public
:
22
class
Member {
23
public
:
24
Member(
const
UUID &uu,
const
json
&,
class
Block &block);
25
Member(
const
UUID &uu);
26
UUID uuid;
27
std::string name;
28
uuid_ptr<Net> net =
nullptr
;
29
json
serialize()
const
;
30
UUID get_uuid()
const
;
31
};
32
33
Bus(
const
UUID &uu,
const
json
&,
class
Block &block);
34
Bus(
const
UUID &uu);
35
UUID get_uuid()
const
;
36
UUID uuid;
37
std::string name;
38
std::map<UUID, Member> members;
39
bool
is_referenced =
false
;
40
void
update_refs(Block &block);
41
json
serialize()
const
;
42
};
43
}
// namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
Generated by
1.8.20