42 #ifndef QSHAREDPOINTER_H 43 #define QSHAREDPOINTER_H 45 #include <QtCore/qglobal.h> 46 #include <QtCore/qatomic.h> 47 #include <QtCore/qshareddata.h> 50 # include <QtCore/qsharedpointer_impl.h> 68 operator bool()
const;
102 operator bool()
const;
152 #endif // QSHAREDPOINTER_H
QSharedPointer< X > constCast() const
Performs a const_cast from this pointer's type to X and returns a QSharedPointer that shares the refe...
QSharedPointer< X > qSharedPointerConstCast(const QSharedPointer< T > &other)
Returns a shared pointer to the pointer held by other, cast to type X.
The QSharedPointer class holds a strong reference to a shared pointer.
#define QT_END_NAMESPACE
This macro expands to.
T & operator*() const
Provides access to the shared pointer's members.
bool operator!() const
Returns true if this object is null.
QWeakPointer< T > toWeakRef() const
Returns a weak reference object that shares the pointer referenced by this object.
bool operator!=(const QSharedPointer< T > &ptr1, const QSharedPointer< X > &ptr2)
Returns true if the pointer referenced by ptr1 is not the same pointer as that referenced by ptr2...
The QObject class is the base class of all Qt objects.
QWeakPointer< X > qWeakPointerCast(const QWeakPointer< T > &src)
QSharedPointer< X > staticCast() const
Performs a static cast from this pointer's type to X and returns a QSharedPointer that shares the ref...
QSharedPointer< X > qSharedPointerDynamicCast(const QSharedPointer< T > &other)
Returns a shared pointer to the pointer held by other, using a dynamic cast to type X to obtain an in...
bool operator==(const QSharedPointer< T > &ptr1, const QSharedPointer< X > &ptr2)
Returns true if the pointer referenced by ptr1 is the same pointer as that referenced by ptr2...
#define QT_BEGIN_NAMESPACE
This macro expands to.
~QSharedPointer()
Destroys this QSharedPointer object.
QSharedPointer< X > objectCast() const
Performs a qobject_cast() from this pointer's type to X and returns a QSharedPointer that shares the ...
T * operator->() const
Provides access to the shared pointer's members.
const T * ptr(const T &t)
T * data() const
Returns the value of the pointer referenced by this object.
QSharedPointer< X > dynamicCast() const
Performs a dynamic cast from this pointer's type to X and returns a QSharedPointer that shares the re...
QSharedPointer< X > qSharedPointerObjectCast(const QSharedPointer< T > &other)
The qSharedPointerObjectCast function is for casting a shared pointer.
void clear()
Clears this QSharedPointer object, dropping the reference that it may have had to the pointer...
QSharedPointer< X > qSharedPointerCast(const QSharedPointer< T > &other)
Returns a shared pointer to the pointer held by other, cast to type X.
QSharedPointer< T > & operator=(const QSharedPointer< T > &other)
Makes this object share other's pointer.
QSharedPointer()
Creates a QSharedPointer that points to null (0).
bool isNull() const
Returns true if this object is holding a reference to a null pointer.
The QWeakPointer class holds a weak reference to a shared pointer.