3434// /////////////////////////////////////////////////////////////////////////////
3535%module pdngen
3636%{
37-
38- // These includes are needed by the SWIG generated CXX files mostly
39- // for determining the size of Classes that they define. Since that are
40- // not actually wrapped, the classes defined in these files will appear as
41- // opaque pointers in Python.
42- #include " ../src/connect.h"
43- #include " ../src/domain.h"
44- #include " ../src/grid.h"
45- #include " ../src/power_cells.h"
46- #include " ../src/renderer.h"
47-
4837#include " pdn/PdnGen.hh"
4938#include " odb/db.h"
5039#include < array>
5140#include < string>
5241#include < memory>
5342#include < vector>
5443
55- using pdn::ExtensionMode;
5644using namespace pdn ;
57-
5845%}
5946
6047%include <std_vector.i>
6148%include <std_array.i>
6249%include <std_map.i>
50+ %include <std_set.i>
51+ %include <std_string.i>
6352
64- // this maps unsigned long to the enum ExtensionMode
6553%include typemaps.i
66- %apply unsigned long { ExtensionMode };
6754
6855%import " odb.i"
6956%clear int & x, int & y; // defined in dbtypes.i, must be cleared here.
70- %include <std_string.i>
7157
7258// These are needed to coax swig into sending or returning Python
7359// lists, arrays, or sets (as appropriate) of opaque pointers. Note
@@ -83,19 +69,8 @@ namespace std {
8369 %template (viagen_list) std::vector<odb::dbTechViaGenerateRule *>;
8470 %template (techvia_list) std::vector<odb::dbTechVia *>;
8571 %template (layer_list) std::vector<odb::dbTechLayer *>;
72+ %template (net_set) std::set<odb::dbNet*>;
8673}
8774
8875%include " ../../Exception-py.i"
8976%include " pdn/PdnGen.hh"
90-
91- %inline %{
92-
93- namespace pdn {
94-
95- // difficult to pass a set. repair_pdn_via takes a vector and then
96- // rebuilds the set in C++, so we just borrow that here.
97- void repair_pdn_vias (const std::vector<odb::dbNet*>& nets);
98-
99- } // namespace
100-
101- %} // %inline
0 commit comments