Horizon
Loading...
Searching...
No Matches
bus_label.hpp
1#pragma once
2#include "util/uuid.hpp"
3#include "nlohmann/json_fwd.hpp"
4#include "common/common.hpp"
5#include "util/uuid_ptr.hpp"
6#include "nlohmann/json_fwd.hpp"
7#include <set>
8
9namespace horizon {
10using json = nlohmann::json;
11
16class BusLabel {
17public:
18 BusLabel(const UUID &uu, const json &j, class Sheet &sheet, class Block &block);
19 BusLabel(const UUID &uu, const json &j);
20 BusLabel(const UUID &uu);
21
22 UUID uuid;
23
24 enum class Style { PLAIN, FLAG };
25 Style style = Style::FLAG;
26
28 Orientation orientation = Orientation::RIGHT;
29 uint64_t size = 1.5_mm;
30 std::set<unsigned int> on_sheets;
31 bool offsheet_refs = true;
33
34 json serialize() const;
35};
36} // namespace horizon
A block is one level of hierarchy in the netlist.
Definition block.hpp:29
Makes a Bus available on the schematic.
Definition bus_label.hpp:16
Definition sheet.hpp:42
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16
Definition uuid_ptr.hpp:8
a class to store JSON values
Definition json.hpp:177
basic_json<> json
default JSON class
Definition json_fwd.hpp:62