Horizon
horizon-eda-1.3.0
src
schematic
schematic_symbol.hpp
1
#pragma once
2
#include "util/uuid.hpp"
3
#include "nlohmann/json_fwd.hpp"
4
#include "pool/unit.hpp"
5
#include "pool/symbol.hpp"
6
#include "pool/gate.hpp"
7
#include "block/block.hpp"
8
#include "util/uuid_ptr.hpp"
9
#include "util/placement.hpp"
10
#include <vector>
11
#include <map>
12
#include <fstream>
13
14
namespace
horizon {
15
using
json
=
nlohmann::json
;
16
17
class
SchematicSymbol
{
18
public
:
19
SchematicSymbol
(
const
UUID
&uu,
const
json
&,
class
IPool
&pool,
Block
*block =
nullptr
);
20
SchematicSymbol
(
const
UUID
&uu,
const
Symbol
*sym);
21
UUID
uuid;
22
const
Symbol
*pool_symbol;
23
Symbol
symbol;
24
uuid_ptr<Component>
component;
25
uuid_ptr<const Gate>
gate;
26
Placement
placement;
27
std::vector<uuid_ptr<Text>> texts;
28
bool
smashed =
false
;
29
enum class
PinDisplayMode { SELECTED_ONLY, BOTH, ALL, CUSTOM_ONLY };
30
PinDisplayMode pin_display_mode = PinDisplayMode::SELECTED_ONLY;
31
bool
display_directions =
false
;
32
bool
display_all_pads =
true
;
33
unsigned
int
expand = 0;
34
void
apply_expand();
35
void
apply_pin_names();
36
37
std::string replace_text(
const
std::string &t,
bool
*replaced,
const
class
Schematic
&sch)
const
;
38
39
UUID
get_uuid()
const
;
40
json
serialize()
const
;
41
};
42
}
// 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::SchematicSymbol
Definition:
schematic_symbol.hpp:17
horizon::Symbol
Definition:
symbol.hpp:71
horizon::IPool
Definition:
ipool.hpp:12
horizon::Schematic
A Schematic is the visual representation of a Block.
Definition:
schematic.hpp:29
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::Placement
Definition:
placement.hpp:8
Generated by
1.8.20