Mantid
|
Holds a Python instance of an object with a method to access it. More...
#include <Object.h>
Public Member Functions | |
InstanceHolder (Object obj) | |
Construct an InstanceHolder with an existing Python object. More... | |
InstanceHolder (Object obj, const char *attr) | |
Construct an InstanceHolder with an existing Python object. More... | |
const Object & | pyobj () const |
Return the held instance object. More... | |
~InstanceHolder () | |
The destructor must hold the GIL to be able reduce the refcount of the object. More... | |
Private Attributes | |
Object | m_instance |
Holds a Python instance of an object with a method to access it.
|
inlineexplicit |
Construct an InstanceHolder with an existing Python object.
obj | An existing Python instance |
|
inline |
|
inline |
The destructor must hold the GIL to be able reduce the refcount of the object.
Definition at line 88 of file Object.h.
References m_instance.
|
inline |
Return the held instance object.
Definition at line 94 of file Object.h.
References m_instance.
Referenced by InstanceHolder().
|
private |
Definition at line 97 of file Object.h.
Referenced by pyobj(), and ~InstanceHolder().