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 7 namespace horizon { 8 using json = nlohmann::json; 9 10 11 /** 12 * GND symbols and the like. A PowerSymbol is associated with a power Net and 13 * will make 14 * its junction connected to this Net. 15 */ 16 class PowerSymbol { 17 public: 18 PowerSymbol(const UUID &uu, const json &j, class Sheet *sheet = nullptr, class Block *block = nullptr); 19 PowerSymbol(const UUID &uu); 20 21 UUID uuid; 22 uuid_ptr<class SchematicJunction> junction; 23 uuid_ptr<class Net> net; 24 bool mirror = false; 25 Orientation orientation = Orientation::DOWN; 26 void mirrorx(); 27 28 UUID get_uuid() const; 29 void update_refs(Sheet &sheet, Block &block); 30 31 json serialize() const; 32 }; 33 } // namespace horizon 34