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