Skip to content

Commit eca690c

Browse files
committed
pdn: add out-of-line ~PdnGen to simplify .i
Signed-off-by: Matt Liberty <[email protected]>
1 parent 9cf5b9e commit eca690c

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

src/pdn/include/pdn/PdnGen.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class PdnGen
8080
{
8181
public:
8282
PdnGen();
83+
~PdnGen();
8384

8485
void init(dbDatabase* db, Logger* logger);
8586

src/pdn/src/PdnGen-py.i

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,22 @@
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;
5644
using namespace pdn;
57-
5845
%}
5946

6047
%include <std_vector.i>
6148
%include <std_array.i>
6249
%include <std_map.i>
6350
%include <std_set.i>
6451

65-
// this maps unsigned long to the enum ExtensionMode
6652
%include typemaps.i
67-
%apply unsigned long { ExtensionMode };
6853

6954
%import "odb.i"
7055
%clear int & x, int & y; // defined in dbtypes.i, must be cleared here.

src/pdn/src/PdnGen.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ PdnGen::PdnGen() : db_(nullptr), logger_(nullptr)
6969
{
7070
}
7171

72+
PdnGen::~PdnGen() = default;
73+
7274
void PdnGen::init(dbDatabase* db, Logger* logger)
7375
{
7476
db_ = db;

0 commit comments

Comments
 (0)