2 #include "util/uuid.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include "pool/unit.hpp"
5 #include "pool/symbol.hpp"
6 #include "pool/gate.hpp"
7 #include "block/block.hpp"
8 #include "util/uuid_ptr.hpp"
9 #include "util/placement.hpp"
17 class SchematicSymbol {
19 SchematicSymbol(
const UUID &uu,
const json &,
class IPool &pool, Block *block =
nullptr);
20 SchematicSymbol(
const UUID &uu,
const Symbol *sym);
22 const Symbol *pool_symbol;
24 uuid_ptr<Component> component;
25 uuid_ptr<const Gate> gate;
27 std::vector<uuid_ptr<Text>> texts;
29 enum class PinDisplayMode { SELECTED_ONLY, BOTH, ALL, CUSTOM_ONLY };
30 PinDisplayMode pin_display_mode = PinDisplayMode::SELECTED_ONLY;
31 bool display_directions =
false;
32 bool display_all_pads =
true;
33 unsigned int expand = 0;
35 void apply_pin_names();
37 std::string replace_text(
const std::string &t,
bool *replaced,
const class Schematic &sch)
const;
39 UUID get_uuid()
const;
40 json serialize()
const;