SourceForge.net Logo
PythonQt
Public Member Functions | Public Attributes | List of all members
PythonQtPassOwnershipToCPP< T > Class Template Reference

#include <PythonQt.h>

Public Member Functions

 PythonQtPassOwnershipToCPP (const T &t)
 Allow conversion from T to PythonQtPassOwnershipToCPP<T> More...
 
 operator T () const
 Allow conversion from PythonQtPassOwnershipToCPP<T> to T. More...
 

Public Attributes

_t
 

Detailed Description

template<class T>
class PythonQtPassOwnershipToCPP< T >

Helper template that allows to pass the ownership of a C++ instance between C++ and Python (it is used as a slot return type or parameter type so that it can be detected by the PythonQt slot calling code).

Definition at line 86 of file PythonQt.h.

Constructor & Destructor Documentation

template<class T >
PythonQtPassOwnershipToCPP< T >::PythonQtPassOwnershipToCPP ( const T &  t)
inline

Allow conversion from T to PythonQtPassOwnershipToCPP<T>

Definition at line 90 of file PythonQt.h.

90 :_t(t) {}

Member Function Documentation

template<class T >
PythonQtPassOwnershipToCPP< T >::operator T ( ) const
inline

Allow conversion from PythonQtPassOwnershipToCPP<T> to T.

Definition at line 92 of file PythonQt.h.

References PythonQtPassOwnershipToCPP< T >::_t.

92 { return _t; }

Member Data Documentation

template<class T >
T PythonQtPassOwnershipToCPP< T >::_t

Stored value. This is important so that it has the same memory layout as a pointer if T is a pointer type (which is the typical use case for this class).

Definition at line 96 of file PythonQt.h.

Referenced by PythonQtPassOwnershipToCPP< T >::operator T().


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