Horizon
power_symbol.hpp
1 #pragma once
2 #include "util/uuid.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include "common/common.hpp"
5 #include "block/block.hpp"
6 #include "util/uuid_ptr.hpp"
7 #include "common/junction.hpp"
8 #include <vector>
9 #include <map>
10 #include <fstream>
11 
12 
13 namespace horizon {
14 using json = nlohmann::json;
15 
16 
22 class PowerSymbol {
23 public:
24  PowerSymbol(const UUID &uu, const json &j, class Sheet *sheet = nullptr, class Block *block = nullptr);
25  PowerSymbol(const UUID &uu);
26 
27  UUID uuid;
28  uuid_ptr<Junction> junction;
29  uuid_ptr<Net> net;
30  bool mirror = false;
31  Orientation orientation = Orientation::DOWN;
32  void mirrorx();
33 
34  UUID get_uuid() const;
35  void update_refs(Sheet &sheet, Block &block);
36 
37  json serialize() const;
38 };
39 } // namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61