Qt 4.8
Public Functions | List of all members
QCustomScopedPointer< T, Cleanup > Class Template Reference

#include <qscopedpointer_p.h>

Inheritance diagram for QCustomScopedPointer< T, Cleanup >:
QScopedPointer< T, Cleanup >

Public Functions

T *& data_ptr ()
 
bool operator!= (const QCustomScopedPointer< T, Cleanup > &other) const
 
bool operator== (const QCustomScopedPointer< T, Cleanup > &other) const
 
 QCustomScopedPointer (T *p=0)
 
- Public Functions inherited from QScopedPointer< T, Cleanup >
T * data () const
 Returns the value of the pointer referenced by this object. More...
 
bool isNull () const
 Returns true if this object is holding a pointer that is null. More...
 
 operator bool () const
 Returns true if this object is not null. More...
 
bool operator! () const
 Returns true if the pointer referenced by this object is null, otherwise returns false. More...
 
T & operator* () const
 Provides access to the scoped pointer's object. More...
 
T * operator-> () const
 Provides access to the scoped pointer's object. More...
 
 QScopedPointer (T *p=0)
 Constructs this QScopedPointer instance and sets its pointer to p. More...
 
void reset (T *other=0)
 Deletes the existing object it is pointing to if any, and sets its pointer to other. More...
 
void swap (QScopedPointer< T, Cleanup > &other)
 Swap this pointer with other. More...
 
T * take ()
 Returns the value of the pointer referenced by this object. More...
 
 ~QScopedPointer ()
 Destroys this QScopedPointer object. More...
 

Additional Inherited Members

- Public Types inherited from QScopedPointer< T, Cleanup >
typedef T * pointer
 
- Protected Variables inherited from QScopedPointer< T, Cleanup >
T * d
 

Detailed Description

template<typename T, typename Cleanup = QScopedPointerDeleter<T>>
class QCustomScopedPointer< T, Cleanup >

Definition at line 66 of file qscopedpointer_p.h.

Constructors and Destructors

◆ QCustomScopedPointer()

template<typename T, typename Cleanup = QScopedPointerDeleter<T>>
QCustomScopedPointer< T, Cleanup >::QCustomScopedPointer ( T *  p = 0)
inlineexplicit

Definition at line 69 of file qscopedpointer_p.h.

71  {
72  }
The QScopedPointer class stores a pointer to a dynamically allocated object, and deletes it upon dest...

Functions

◆ data_ptr()

template<typename T, typename Cleanup = QScopedPointerDeleter<T>>
T*& QCustomScopedPointer< T, Cleanup >::data_ptr ( )
inline

Definition at line 74 of file qscopedpointer_p.h.

75  {
76  return this->d;
77  }

◆ operator!=()

template<typename T, typename Cleanup = QScopedPointerDeleter<T>>
bool QCustomScopedPointer< T, Cleanup >::operator!= ( const QCustomScopedPointer< T, Cleanup > &  other) const
inline

Definition at line 84 of file qscopedpointer_p.h.

85  {
86  return this->d != other.d;
87  }

◆ operator==()

template<typename T, typename Cleanup = QScopedPointerDeleter<T>>
bool QCustomScopedPointer< T, Cleanup >::operator== ( const QCustomScopedPointer< T, Cleanup > &  other) const
inline

Definition at line 79 of file qscopedpointer_p.h.

80  {
81  return this->d == other.d;
82  }

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