QtCore/qscopedpointer.h File Reference

qscopedpointer.h File Reference
#include <QtCore/qglobal.h>

Classes

struct  QScopedPointerDeleter< T >
 
struct  QScopedPointerArrayDeleter< T >
 
struct  QScopedPointerPodDeleter
 
class  QScopedPointer< T, Cleanup >
 
struct  QScopedArrayEnsureSameType< X, Y >
 
struct  QScopedArrayEnsureSameType< X, X >
 
struct  QScopedArrayEnsureSameType< const X, X >
 
class  QScopedArrayPointer< T, Cleanup >
 

Namespaces

 std
 
 QtPrivate
 

Functions

template<class T , class Cleanup >
bool operator== (const QScopedPointer< T, Cleanup > &lhs, const QScopedPointer< T, Cleanup > &rhs)
 
template<class T , class Cleanup >
bool operator!= (const QScopedPointer< T, Cleanup > &lhs, const QScopedPointer< T, Cleanup > &rhs)
 
template<class T , class Cleanup >
Q_INLINE_TEMPLATE void qSwap (QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
 
template<class T , class Cleanup >
Q_INLINE_TEMPLATE void swap (QT_PREPEND_NAMESPACE(QScopedPointer)< T, Cleanup > &p1, QT_PREPEND_NAMESPACE(QScopedPointer)< T, Cleanup > &p2)
 

Function Documentation

bool operator== ( const QScopedPointer< T, Cleanup > &  lhs,
const QScopedPointer< T, Cleanup > &  rhs 
)
inline

Definition at line 174 of file qscopedpointer.h.

175 {
176  return lhs.data() == rhs.data();
177 }
T * data() const
bool operator!= ( const QScopedPointer< T, Cleanup > &  lhs,
const QScopedPointer< T, Cleanup > &  rhs 
)
inline

Definition at line 180 of file qscopedpointer.h.

181 {
182  return lhs.data() != rhs.data();
183 }
T * data() const
Q_INLINE_TEMPLATE void qSwap ( QScopedPointer< T, Cleanup > &  p1,
QScopedPointer< T, Cleanup > &  p2 
)

Definition at line 186 of file qscopedpointer.h.

187 { p1.swap(p2); }
void swap(QScopedPointer< T, Cleanup > &other)

Go to the source code of this file.