Horizon
src
common
junction.hpp
1
#pragma once
2
#include "util/uuid.hpp"
3
#include "common.hpp"
4
#include "block/net.hpp"
5
#include "util/uuid_ptr.hpp"
6
#include "nlohmann/json_fwd.hpp"
7
#include "block/bus.hpp"
8
#include "util/layer_range.hpp"
9
10
namespace
horizon {
11
using
json
=
nlohmann::json
;
12
22
class
Junction {
23
public
:
24
Junction(
const
UUID &uu,
const
json
&j);
25
Junction(
const
UUID &uu);
26
27
UUID uuid;
28
Coord<int64_t> position;
29
30
31
UUID get_uuid()
const
;
32
33
// not stored
34
uuid_ptr<Net> net =
nullptr
;
35
uuid_ptr<Bus> bus =
nullptr
;
36
UUID net_segment = UUID();
37
bool
warning =
false
;
38
LayerRange layer = 10000;
39
bool
needs_via =
false
;
40
bool
has_via =
false
;
// in schematic: true if has net label, etc.
41
unsigned
int
connection_count = 0;
42
43
json
serialize()
const
;
44
};
45
}
// 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