PythonQt
Public Member Functions | Static Public Member Functions | List of all members
PythonQtArgumentFrame Class Reference

Stores C++ arguments for a qt_metacall (which are created when converting data from Python to C++) More...

#include <PythonQtMisc.h>

Public Member Functions

void reset ()
 Resets the pod and variant argument lists to empty lists.
 
QVariantnextVariantPtr ()
 Get next pointer to a variant.
 
quint64nextPODPtr ()
 Get next pointer to a POD.
 
template<typename Class >
voidestablishPersistentPtr (void *alreadyAllocatedPtr, const Class &value)
 
template<typename Class , typename ViewClass >
voidestablishPersistentViewPtr (void *alreadyAllocatedPtr, const Class &value)
 

Static Public Member Functions

static PythonQtArgumentFramenewFrame ()
 Create a new (empty) frame (which is typically reused from a freelist)
 
static void deleteFrame (PythonQtArgumentFrame *frame)
 Frees the frame (resetting it and putting it back to the freelist)
 
static void cleanupFreeList ()
 Frees all PythonQtArgumentFrame frames that are stored.
 

Detailed Description

Stores C++ arguments for a qt_metacall (which are created when converting data from Python to C++)

Definition at line 104 of file PythonQtMisc.h.

Member Function Documentation

◆ cleanupFreeList()

static void PythonQtArgumentFrame::cleanupFreeList ( )
static

Frees all PythonQtArgumentFrame frames that are stored.

◆ deleteFrame()

static void PythonQtArgumentFrame::deleteFrame ( PythonQtArgumentFrame frame)
static

Frees the frame (resetting it and putting it back to the freelist)

◆ establishPersistentPtr()

template<typename Class >
void * PythonQtArgumentFrame::establishPersistentPtr ( void alreadyAllocatedPtr,
const Class &  value 
)
inline

Definition at line 125 of file PythonQtMisc.h.

126 {
128 *reinterpret_cast<Class*>(alreadyAllocatedPtr) = value;
129 return alreadyAllocatedPtr;
130 } else {
132 *item = QVariant(value);
133 return const_cast<void*>(item->constData());
134 }
135 }
PyObject * PythonQtConvertPairToPython(const void *inPair, int metaTypeId)
QVariant * nextVariantPtr()
Get next pointer to a variant.

References nextVariantPtr(), and PythonQtConvertPairToPython().

◆ establishPersistentViewPtr()

template<typename Class , typename ViewClass >
void * PythonQtArgumentFrame::establishPersistentViewPtr ( void alreadyAllocatedPtr,
const Class &  value 
)
inline

Definition at line 138 of file PythonQtMisc.h.

139 {
143 *reinterpret_cast<ViewClass*>(alreadyAllocatedPtr) =
144 ViewClass(*reinterpret_cast<const Class*>(itemStore->constData()));
145 return alreadyAllocatedPtr;
146 } else {
148 *item = QVariant::fromValue(ViewClass(*reinterpret_cast<const Class*>(itemStore->constData())));
149 return const_cast<void*>(item->constData());
150 }
151 }

References nextVariantPtr(), and PythonQtConvertPairToPython().

◆ newFrame()

static PythonQtArgumentFrame * PythonQtArgumentFrame::newFrame ( )
static

Create a new (empty) frame (which is typically reused from a freelist)

◆ nextPODPtr()

quint64 * PythonQtArgumentFrame::nextPODPtr ( )

Get next pointer to a POD.

◆ nextVariantPtr()

QVariant * PythonQtArgumentFrame::nextVariantPtr ( )

Get next pointer to a variant.

Referenced by establishPersistentPtr(), and establishPersistentViewPtr().

◆ reset()

void PythonQtArgumentFrame::reset ( )

Resets the pod and variant argument lists to empty lists.


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