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 "util/uuid.hpp"
22 #include <map>
23 #include <set>
24 
25 namespace horizon {
26 class Buffer {
27 public:
28  Buffer(class Core *co);
29  void clear();
30  void load_from_symbol(std::set<SelectableRef> selection);
31 
32  std::map<UUID, Text> texts;
33  std::map<UUID, Junction> junctions;
34  std::map<UUID, Line> lines;
35  std::map<UUID, Arc> arcs;
36  std::map<UUID, Pad> pads;
37  std::map<UUID, Polygon> polygons;
38  std::map<UUID, Component> components;
39  std::map<UUID, SchematicSymbol> symbols;
40  std::map<UUID, SymbolPin> pins;
41  std::map<UUID, Net> nets;
42  std::map<UUID, LineNet> net_lines;
43  std::map<UUID, Hole> holes;
44  std::map<UUID, Shape> shapes;
45  std::map<UUID, PowerSymbol> power_symbols;
46  std::map<UUID, NetLabel> net_labels;
47  std::map<UUID, Via> vias;
48  std::map<UUID, Track> tracks;
49 
50  json serialize();
51 
52 private:
53  Cores core;
54  NetClass net_class_dummy;
55 };
56 } // namespace horizon
a class to store JSON values
Definition: json.hpp:161
Tools use this class to actually access the core.
Definition: cores.hpp:13
Definition: buffer.hpp:26
Where Tools and and documents meet.
Definition: core.hpp:232
Definition: net_class.hpp:10
Definition: block.cpp:9