PCB Environment 2

Loading...
Searching...
No Matches
PCBItemSets.hpp
1
2#ifndef GYM_PCB_UTIL_SUBSETS
3#define GYM_PCB_UTIL_SUBSETS
4
5#include "Py.hpp"
6#include <set>
7 class Component;
8 class Pin;
9 class Connection;
10 class Net;
11 class PCBoard;
12
13 namespace util
14{
15
16 void populate(std::set<Connection *>&, PCBoard&, PyObject *);
17 void populate(std::set<Net *>&, PCBoard&, PyObject *);
18 void populate(std::set<Component *>&, PCBoard&, PyObject *);
19 void populate(std::set<Pin *>&, PCBoard&, PyObject *);
20
21} // namespace util
22
23 struct PCBItemSets
24{
25 PCBItemSets(std::set<Component *> *com = 0,
26 std::set<Pin *> *pin = 0,
27 std::set<Net *> *net = 0,
28 std::set<Connection *> *con = 0) : coms(com), pins(pin), nets(net), cons(con)
29 {
30 if (!com) coms = &_coms;
31 if (!pin) pins = &_pins;
32 if (!net) nets = &_nets;
33 if (!con) cons = &_cons;
34 }
35 std::set<Component *> *coms;
36 std::set<Component *> _coms;
37 std::set<Pin *> *pins;
38 std::set<Pin *> _pins;
39 std::set<Net *> *nets;
40 std::set<Net *> _nets;
41 std::set<Connection *> *cons;
42 std::set<Connection *> _cons;
43 void populate(PCBoard&, PyObject *);
44 void clear();
45 void complement(PCBoard&);
46 void populateComsFromPins();
47 void populateComsFromNets();
48 void populateComsFromConnections();
49 void populatePinsFromComs();
50 void populatePinsFromNets();
51 void populatePinsFromConnections();
52 void populateNetsFromComs();
53 void populateNetsFromPins();
54 void populateNetsFromConnections();
55 void populateConnectionsFromComs();
56 void populateConnectionsFromPins();
57 void populateConnectionsFromNets();
58 void prune(PCBoard&);
59};
60
61#endif // GYM_PCB_UTIL_SUBSETS
Component
Definition Component.hpp:18
Connection
Definition Connection.hpp:17
Net
Definition Net.hpp:19
PCBoard
Definition PCBoard.hpp:36
Pin
Definition Pin.hpp:18