PythonQt
PythonQtDebugAPI Class Reference

Some helper methods that allow testing of the ownership. More...

#include <PythonQtStdDecorators.h>

Inheritance diagram for PythonQtDebugAPI:

Public Slots

bool isOwnedByPython (PyObject *object)
 Returns if the C++ object is owned by PythonQt and will be deleted when the reference goes away.
bool isDerivedShellInstance (PyObject *object)
 Returns if the C++ object is an instance of a Python class that derives a C++ class.
bool hasExtraShellRefCount (PyObject *object)
 Returns if the shell instance has an extra ref count from the C++ side.
bool passOwnershipToCPP (PyObject *object)
 Pass the ownership of the given object to CPP (so that it will not be deleted by Python if the reference goes away).
bool passOwnershipToPython (PyObject *object)
 Pass the ownership of the given object to Python (so that the C++ object will be deleted when the Python reference goes away).
bool isPythonQtInstanceWrapper (PyObject *object)
 Returns if the given object is a PythonQt instance wrapper (or derived class).
bool isPythonQtClassWrapper (PyObject *object)
 Returns if the given object is a PythonQt class wrapper (or derived class).

Public Member Functions

 PythonQtDebugAPI (QObject *parent)

Detailed Description

Some helper methods that allow testing of the ownership.

Definition at line 239 of file PythonQtStdDecorators.h.

Constructor & Destructor Documentation

◆ PythonQtDebugAPI()

PythonQtDebugAPI::PythonQtDebugAPI ( QObject * parent)
inline

Definition at line 243 of file PythonQtStdDecorators.h.

244 : QObject(parent) {};

Member Function Documentation

◆ hasExtraShellRefCount

bool PythonQtDebugAPI::hasExtraShellRefCount ( PyObject * object)
slot

Returns if the shell instance has an extra ref count from the C++ side.

◆ isDerivedShellInstance

bool PythonQtDebugAPI::isDerivedShellInstance ( PyObject * object)
slot

Returns if the C++ object is an instance of a Python class that derives a C++ class.

◆ isOwnedByPython

bool PythonQtDebugAPI::isOwnedByPython ( PyObject * object)
slot

Returns if the C++ object is owned by PythonQt and will be deleted when the reference goes away.

◆ isPythonQtClassWrapper

bool PythonQtDebugAPI::isPythonQtClassWrapper ( PyObject * object)
slot

Returns if the given object is a PythonQt class wrapper (or derived class).

◆ isPythonQtInstanceWrapper

bool PythonQtDebugAPI::isPythonQtInstanceWrapper ( PyObject * object)
slot

Returns if the given object is a PythonQt instance wrapper (or derived class).

◆ passOwnershipToCPP

bool PythonQtDebugAPI::passOwnershipToCPP ( PyObject * object)
slot

Pass the ownership of the given object to CPP (so that it will not be deleted by Python if the reference goes away).

◆ passOwnershipToPython

bool PythonQtDebugAPI::passOwnershipToPython ( PyObject * object)
slot

Pass the ownership of the given object to Python (so that the C++ object will be deleted when the Python reference goes away).


The documentation for this class was generated from the following file: