Skip to content

Commit

Permalink
Base: [skip ci] add convenience function to get PyObjectBase from Geo…
Browse files Browse the repository at this point in the history
…metryT
  • Loading branch information
wwmayer committed Apr 12, 2021
1 parent a257498 commit d4e0160
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Base/GeometryPyCXX.h
Expand Up @@ -185,11 +185,12 @@ class GeometryT : public Object
}
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:
Expand Down

0 comments on commit d4e0160

Please sign in to comment.