Horizon
buffer.hpp
1 #pragma once
2 #include "block/component.hpp"
3 #include "block/net.hpp"
4 #include "canvas/selectables.hpp"
5 #include "common/arc.hpp"
6 #include "common/hole.hpp"
7 #include "common/junction.hpp"
8 #include "common/line.hpp"
9 #include "common/polygon.hpp"
10 #include "common/shape.hpp"
11 #include "common/text.hpp"
12 #include "cores.hpp"
13 #include "nlohmann/json_fwd.hpp"
14 #include "package/pad.hpp"
15 #include "pool/symbol.hpp"
16 #include "schematic/net_label.hpp"
17 #include "schematic/power_symbol.hpp"
18 #include "schematic/schematic_symbol.hpp"
19 #include "board/via.hpp"
20 #include "board/track.hpp"
21 #include "board/board_hole.hpp"
22 #include "common/dimension.hpp"
23 #include "util/uuid.hpp"
24 #include <map>
25 #include <set>
26 
27 namespace horizon {
28 class Buffer {
29 public:
30  Buffer(class Core *co);
31  void clear();
32  void load(std::set<SelectableRef> selection);
33 
34  std::map<UUID, Text> texts;
35  std::map<UUID, Junction> junctions;
36  std::map<UUID, Line> lines;
37  std::map<UUID, Arc> arcs;
38  std::map<UUID, Pad> pads;
39  std::map<UUID, Polygon> polygons;
40  std::map<UUID, Component> components;
41  std::map<UUID, SchematicSymbol> symbols;
42  std::map<UUID, SymbolPin> pins;
43  std::map<UUID, Net> nets;
44  std::map<UUID, LineNet> net_lines;
45  std::map<UUID, Hole> holes;
46  std::map<UUID, Shape> shapes;
47  std::map<UUID, PowerSymbol> power_symbols;
48  std::map<UUID, NetLabel> net_labels;
49  std::map<UUID, Via> vias;
50  std::map<UUID, Track> tracks;
51  std::map<UUID, BoardHole> board_holes;
52  std::map<UUID, Dimension> dimensions;
53 
54  json serialize();
55 
56 private:
57  Cores core;
58  NetClass net_class_dummy;
59 };
60 } // namespace horizon
horizon::NetClass
Definition: net_class.hpp:10
horizon::Cores
Tools use this class to actually access the core.
Definition: cores.hpp:13
horizon::Buffer
Definition: buffer.hpp:28
horizon::Core
Where Tools and and documents meet.
Definition: core.hpp:240
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:161