2 #include "util/uuid.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include "common/common.hpp"
5 #include "common/junction.hpp"
6 #include "util/uuid_ptr.hpp"
7 #include "schematic_symbol.hpp"
8 #include "block/net.hpp"
9 #include "block/bus.hpp"
10 #include "power_symbol.hpp"
11 #include "bus_ripper.hpp"
25 enum class End { TO, FROM };
27 LineNet(
const UUID &uu,
const json &j,
class Sheet *sheet =
nullptr);
28 LineNet(
const UUID &uu);
30 void update_refs(
class Sheet &sheet);
31 bool is_connected_to(
const UUID &uu_sym,
const UUID &uu_pin)
const;
32 UUID get_uuid()
const;
33 bool coord_on_line(
const Coordi &coord)
const;
35 uuid_ptr<Net> net =
nullptr;
36 uuid_ptr<Bus> bus =
nullptr;
37 UUID net_segment = UUID();
47 Connection(
const json &j, Sheet *sheet);
48 uuid_ptr<Junction> junc =
nullptr;
49 uuid_ptr<SchematicSymbol> symbol =
nullptr;
50 uuid_ptr<SymbolPin> pin =
nullptr;
51 uuid_ptr<BusRipper> bus_ripper =
nullptr;
52 bool operator<(
const Connection &other)
const;
53 bool operator==(
const Connection &other)
const;
55 void connect(Junction *j);
56 void connect(BusRipper *r);
57 void connect(SchematicSymbol *j, SymbolPin *pin);
58 UUIDPath<2> get_pin_path()
const;
61 bool is_bus_ripper()
const;
62 UUID get_net_segment()
const;
63 void update_refs(
class Sheet &sheet);
64 Coordi get_position()
const;
65 json serialize()
const;
72 json serialize()
const;