QPointer< T > Class Template Reference

QPointer< T > Class Template Reference

#include <qpointer.h>

Class Description

template<class T>
class QPointer< T >

Definition at line 54 of file qpointer.h.

Public Member Functions

 QPointer ()
 
 QPointer (T *p)
 
 QPointer (const QPointer< T > &p)
 
 ~QPointer ()
 
QPointer< T > & operator= (const QPointer< T > &p)
 
QPointer< T > & operator= (T *p)
 
bool isNull () const
 
T * operator-> () const
 
T & operator* () const
 
 operator T * () const
 
T * data () const
 

Constructor & Destructor Documentation

QPointer ( )
inline

Definition at line 58 of file qpointer.h.

58 : o(0) {}
QPointer ( T *  p)
inline

Definition at line 59 of file qpointer.h.

59  : o(p)
60  { QMetaObject::addGuard(&o); }
static void addGuard(QObject **ptr)
GLfloat GLfloat p
Definition: GLee.h:5416
QPointer ( const QPointer< T > &  p)
inline

Definition at line 61 of file qpointer.h.

61  : o(p.o)
62  { QMetaObject::addGuard(&o); }
static void addGuard(QObject **ptr)
~QPointer ( )
inline

Definition at line 63 of file qpointer.h.

static void removeGuard(QObject **ptr)

Member Function Documentation

QPointer<T>& operator= ( const QPointer< T > &  p)
inline

Definition at line 65 of file qpointer.h.

66  { if (this != &p) QMetaObject::changeGuard(&o, p.o); return *this; }
static void changeGuard(QObject **ptr, QObject *o)
QPointer<T>& operator= ( T *  p)
inline

Definition at line 67 of file qpointer.h.

68  { if (o != p) QMetaObject::changeGuard(&o, p); return *this; }
static void changeGuard(QObject **ptr, QObject *o)
GLfloat GLfloat p
Definition: GLee.h:5416
bool isNull ( ) const
inline

Definition at line 70 of file qpointer.h.

71  { return !o; }
T* operator-> ( void  ) const
inline

Definition at line 73 of file qpointer.h.

74  { return static_cast<T*>(const_cast<QObject*>(o)); }
T& operator* ( ) const
inline

Definition at line 75 of file qpointer.h.

76  { return *static_cast<T*>(const_cast<QObject*>(o)); }
operator T * ( ) const
inline

Definition at line 77 of file qpointer.h.

78  { return static_cast<T*>(const_cast<QObject*>(o)); }
T* data ( ) const
inline

Definition at line 79 of file qpointer.h.

80  { return static_cast<T*>(const_cast<QObject*>(o)); }

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