2 #include "block/net.hpp"
3 #include "board_package.hpp"
4 #include "common/common.hpp"
5 #include "common/junction.hpp"
6 #include "nlohmann/json_fwd.hpp"
7 #include "util/uuid.hpp"
8 #include "util/uuid_ptr.hpp"
18 Track(
const UUID &uu,
const json &j,
class Board *brd =
nullptr);
19 Track(
const UUID &uu);
21 void update_refs(
class Board &brd);
22 UUID get_uuid()
const;
23 bool coord_on_line(
const Coordi &coord)
const;
26 uuid_ptr<Net> net =
nullptr;
29 bool width_from_rules =
true;
38 Connection(
const json &j, Board *brd =
nullptr);
39 Connection(Junction *j);
40 Connection(BoardPackage *pkg, Pad *pad);
41 uuid_ptr<Junction> junc =
nullptr;
42 uuid_ptr<BoardPackage>
package = nullptr;
43 uuid_ptr<Pad> pad =
nullptr;
44 bool operator<(
const Track::Connection &other)
const;
45 bool operator==(
const Track::Connection &other)
const;
47 void connect(Junction *j);
48 void connect(BoardPackage *pkg, Pad *pad);
49 UUIDPath<2> get_pad_path()
const;
52 UUID get_net_segment()
const;
53 void update_refs(
class Board &brd);
54 Coordi get_position()
const;
55 LayerRange get_layer()
const;
58 json serialize()
const;
64 json serialize()
const;