Horizon
src
block
net.hpp
1
#pragma once
2
#include "nlohmann/json_fwd.hpp"
3
#include "pool/unit.hpp"
4
#include "util/uuid.hpp"
5
#include "util/uuid_provider.hpp"
6
#include "util/uuid_ptr.hpp"
7
#include <fstream>
8
#include <map>
9
#include <vector>
10
11
#include "net_class.hpp"
12
13
namespace
horizon {
14
using
json
=
nlohmann::json
;
15
16
class
Net
:
public
UUIDProvider
{
17
public
:
18
Net
(
const
UUID
&uu,
const
json
&,
class
Block
&block);
19
Net
(
const
UUID
&uu,
const
json
&);
20
Net
(
const
UUID
&uu);
21
virtual
UUID
get_uuid()
const
;
22
UUID
uuid;
23
std::string name;
24
bool
is_power =
false
;
25
26
enum class
PowerSymbolStyle { GND, EARTH, DOT, ANTENNA };
27
PowerSymbolStyle power_symbol_style = PowerSymbolStyle::GND;
28
bool
power_symbol_name_visible =
true
;
29
30
uuid_ptr<NetClass>
net_class;
31
uuid_ptr<Net>
diffpair;
32
bool
diffpair_master =
false
;
33
34
// not saved
35
bool
is_power_forced =
false
;
36
bool
is_bussed =
false
;
37
unsigned
int
n_pins_connected = 0;
38
bool
has_bus_rippers =
false
;
39
json
serialize()
const
;
40
bool
is_named()
const
;
41
};
42
}
// namespace horizon
horizon::uuid_ptr
Definition:
uuid_ptr.hpp:9
nlohmann::json
basic_json<> json
default JSON class
Definition:
json_fwd.hpp:61
horizon::Net
Definition:
net.hpp:16
horizon::Block
A block is one level of hierarchy in the netlist.
Definition:
block.hpp:26
nlohmann::basic_json
a class to store JSON values
Definition:
json.hpp:161
horizon::UUID
This class encapsulates a UUID and allows it to be uses as a value type.
Definition:
uuid.hpp:16
horizon::UUIDProvider
Interface for objects that have a UUID.
Definition:
uuid_provider.hpp:9
Generated by
1.8.16