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 "common/junction.hpp"
7 #include <vector>
8 #include <map>
9 #include <set>
10 #include <fstream>
11 
12 
13 namespace horizon {
14 using json = nlohmann::json;
15 
21 class NetLabel {
22 public:
23  NetLabel(const UUID &uu, const json &j, class Sheet *sheet = nullptr);
24  NetLabel(const UUID &uu);
25 
26  UUID uuid;
27 
28  enum class Style { PLAIN, FLAG };
29  Style style = Style::FLAG;
30 
31  uuid_ptr<Junction> junction;
32  Orientation orientation = Orientation::RIGHT;
33  uint64_t size = 1.5_mm;
34  std::set<unsigned int> on_sheets;
35  bool offsheet_refs = true;
36 
37  json serialize() const;
38 };
39 } // namespace horizon
horizon::uuid_ptr
Definition: uuid_ptr.hpp:9
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
libzip::uint64_t
zip_uint64_t uint64_t
zip_uint64_t_t typedef.
Definition: zip.hpp:108
horizon::NetLabel
Displays the junction's Net name it is attached to.
Definition: net_label.hpp:21
horizon::Sheet
Definition: sheet.hpp:37
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