Horizon
net_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 <set>
7 
8 namespace horizon {
9 using json = nlohmann::json;
10 
16 class NetLabel {
17 public:
18  NetLabel(const UUID &uu, const json &j, class Sheet *sheet = nullptr);
19  NetLabel(const UUID &uu);
20 
21  UUID uuid;
22 
23  enum class Style { PLAIN, FLAG };
24  Style style = Style::FLAG;
25 
27  Orientation orientation = Orientation::RIGHT;
28  uint64_t size = 1.5_mm;
29  std::set<unsigned int> on_sheets;
30  bool offsheet_refs = true;
31  bool show_port = false;
32 
33  json serialize() const;
34 };
35 } // namespace horizon
Displays the junction's Net name it is attached to.
Definition: net_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