Horizon
horizon-eda-1.3.0
src
schematic
power_symbol.hpp
1
#pragma once
2
#include "util/uuid.hpp"
3
#include "nlohmann/json_fwd.hpp"
4
#include "common/common.hpp"
5
#include "block/block.hpp"
6
#include "util/uuid_ptr.hpp"
7
#include "common/junction.hpp"
8
#include <vector>
9
#include <map>
10
#include <fstream>
11
12
13
namespace
horizon {
14
using
json
=
nlohmann::json
;
15
16
22
class
PowerSymbol
{
23
public
:
24
PowerSymbol
(
const
UUID
&uu,
const
json
&j,
class
Sheet
*sheet =
nullptr
,
class
Block
*block =
nullptr
);
25
PowerSymbol
(
const
UUID
&uu);
26
27
UUID
uuid;
28
uuid_ptr<Junction>
junction;
29
uuid_ptr<Net>
net;
30
bool
mirror =
false
;
31
Orientation orientation = Orientation::DOWN;
32
void
mirrorx();
33
34
UUID
get_uuid()
const
;
35
void
update_refs(
Sheet
&sheet,
Block
&block);
36
37
json
serialize()
const
;
38
};
39
}
// namespace horizon
horizon::uuid_ptr
Definition:
uuid_ptr.hpp:8
horizon::Block
A block is one level of hierarchy in the netlist.
Definition:
block.hpp:25
horizon::Sheet
Definition:
sheet.hpp:38
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:166
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition:
uuid.hpp:16
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
horizon::PowerSymbol
GND symbols and the like.
Definition:
power_symbol.hpp:22
Generated by
1.8.20