Base: [skip ci] add convenience function to get PyObjectBase from GeometryT

This commit is contained in:
wmayer
2021-04-12 15:12:21 +02:00
parent 0566443907
commit b15e41fdb1

View File

@@ -185,11 +185,12 @@ public:
}
operator T() const
{
// cast the PyObject pointer to the matching sub-class
// and call then the defined member function
return getValue();
}
PyT* getPy() const
{
PyT* py = static_cast<PyT*>(ptr());
T* v = (py->*valuePtr)();
return *v;
return py;
}
private: