Horizon
Loading...
Searching...
No Matches
bus_ripper.hpp
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#include "block/bus.hpp"
7#include <vector>
8
9namespace horizon {
10using json = nlohmann::json;
11
15class BusRipper {
16public:
17 BusRipper(const UUID &uu, const json &j, class Sheet &sheet, class Block &block);
18 BusRipper(const UUID &uu, const json &j);
19 BusRipper(const UUID &uu);
20 UUID get_uuid() const;
21 UUID uuid;
22
24 Orientation orientation = Orientation::UP;
25 void mirror();
26 uuid_ptr<Bus> bus = nullptr;
27 uuid_ptr<Bus::Member> bus_member = nullptr;
28 std::vector<UUID> connections;
29
30 void update_refs(class Sheet &sheet, class Block &block);
31 Coordi get_connector_pos() const;
32
33
34 json serialize() const;
35
36 UUID net_segment; // net segment from net, not from bus
37};
38} // namespace horizon
A block is one level of hierarchy in the netlist.
Definition block.hpp:29
Make a Bus member's Net available on the schematic.
Definition bus_ripper.hpp:15
Definition sheet.hpp:42
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16
Definition uuid_ptr.hpp:8
a class to store JSON values
Definition json.hpp:177
basic_json<> json
default JSON class
Definition json_fwd.hpp:62