Horizon
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 
9 namespace horizon {
10 using json = nlohmann::json;
11 
16 class BusLabel {
17 public:
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:40
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
zip_uint64_t uint64_t
zip_uint64_t_t typedef.
Definition: zip.hpp:108
basic_json<> json
default JSON class
Definition: json_fwd.hpp:62