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 "util/uuid_provider.hpp"
6 #include "block/block.hpp"
7 #include "util/uuid_ptr.hpp"
8 #include "common/junction.hpp"
9 #include <vector>
10 #include <map>
11 #include <fstream>
12 
13 
14 namespace horizon {
15 using json = nlohmann::json;
16 
17 
24 public:
25  PowerSymbol(const UUID &uu, const json &j, class Sheet *sheet = nullptr, class Block *block = nullptr);
26  PowerSymbol(const UUID &uu);
27 
28  UUID uuid;
29  uuid_ptr<Junction> junction;
30  uuid_ptr<Net> net;
31  bool mirror = false;
32  Orientation orientation = Orientation::DOWN;
33  void mirrorx();
34 
35  virtual UUID get_uuid() const;
36  void update_refs(Sheet &sheet, Block &block);
37 
38  // not stored
39  bool temp;
40 
41  json serialize() const;
42 };
43 } // namespace horizon
horizon::uuid_ptr
Definition: uuid_ptr.hpp:9
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
horizon::Block
A block is one level of hierarchy in the netlist.
Definition: block.hpp:26
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
horizon::UUIDProvider
Interface for objects that have a UUID.
Definition: uuid_provider.hpp:9
horizon::PowerSymbol
GND symbols and the like.
Definition: power_symbol.hpp:23