22 enum class ConnectorStyle { BOX, NONE, NC };
29 uint64_t length = 2.5_mm;
30 bool name_visible =
true;
31 bool pad_visible =
true;
33 using NameOrientation = PinNameOrientation;
34 NameOrientation name_orientation = NameOrientation::IN_LINE;
36 Orientation orientation = Orientation::RIGHT;
37 Orientation get_orientation_for_placement(
const Placement &p)
const;
49 OPEN_COLLECTOR_PULLUP,
51 OPEN_EMITTER_PULLDOWN,
54 Driver driver = Driver::DEFAULT;
56 json serialize()
const;
63 ConnectorStyle connector_style = ConnectorStyle::BOX;
64 unsigned int connection_count = 0;
66 Pin::Direction direction = Pin::Direction::BIDIRECTIONAL;
68 json serialize()
const;
69 UUID get_uuid()
const;
76 static Symbol new_from_file(
const std::string &filename,
IPool &pool);
77 static unsigned int get_app_version();
78 std::pair<Coordi, Coordi> get_bbox(
bool all =
false)
const;
81 json serialize()
const;
89 void operator=(
Symbol const &sym);
91 void apply_expand(
const Symbol &ref,
unsigned int ex);
94 std::shared_ptr<const Unit> unit;
96 std::map<UUID, SymbolPin> pins;
97 std::map<UUID, Junction> junctions;
98 std::map<UUID, Line> lines;
99 std::map<UUID, Arc> arcs;
100 std::map<UUID, Text> texts;
101 std::map<UUID, Polygon> polygons;
102 bool can_expand =
false;
104 std::map<std::tuple<int, bool, UUID>,
Placement> text_placements;
105 void apply_placement(
const Placement &p);
110 unsigned int get_required_version()
const;
112 void update_junction_connections();