py-bind with multiple inheritance

This commit is contained in:
Joachim Schöberl 2018-12-30 15:27:48 +01:00
parent 73c60d5194
commit f87a173ccf
2 changed files with 3 additions and 2 deletions

View File

@ -128,7 +128,7 @@ namespace netgen
class SplineGeometry2d : public NetgenGeometry, public SplineGeometry<2> class SplineGeometry2d : public SplineGeometry<2>, public NetgenGeometry
{ {
protected: protected:
Array<char*> materials; Array<char*> materials;

View File

@ -17,7 +17,8 @@ DLL_HEADER void ExportGeom2d(py::module &m)
{ {
py::class_<SplineGeometry2d, NetgenGeometry, shared_ptr<SplineGeometry2d>> py::class_<SplineGeometry2d, NetgenGeometry, shared_ptr<SplineGeometry2d>>
(m, "SplineGeometry", (m, "SplineGeometry",
"a 2d boundary representation geometry model by lines and splines") "a 2d boundary representation geometry model by lines and splines",
py::multiple_inheritance())
.def(py::init<>()) .def(py::init<>())
.def(py::init([](const string& filename) .def(py::init([](const string& filename)
{ {