Definition at line 69 of file qshareddata.h.
#include <qshareddata.h>
Public Types |
|
| typedef T | Type |
| typedef T * | pointer |
Public Member Functions |
|
| void | detach () |
| T & | operator* () |
| const T & | operator* () const |
| T * | operator-> () |
| const T * | operator-> () const |
| operator T * () | |
| operator const T * () const | |
| T * | data () |
| const T * | data () const |
| const T * | constData () const |
| bool | operator== (const QSharedDataPointer< T > &other) const |
| bool | operator!= (const QSharedDataPointer< T > &other) const |
| QSharedDataPointer () | |
| ~QSharedDataPointer () | |
| QSharedDataPointer (T *data) | |
| QSharedDataPointer (const QSharedDataPointer< T > &o) | |
| QSharedDataPointer< T > & | operator= (const QSharedDataPointer< T > &o) |
| QSharedDataPointer & | operator= (T *o) |
| bool | operator! () const |
| void | swap (QSharedDataPointer &other) |
Protected Member Functions |
|
| T * | clone () |
| typedef T Type |
Definition at line 72 of file qshareddata.h.
| typedef T* pointer |
Definition at line 73 of file qshareddata.h.
| QSharedDataPointer | ( | ) | [inline] |
Definition at line 89 of file qshareddata.h.
{ d = 0; }
| ~QSharedDataPointer | ( | ) | [inline] |
Definition at line 90 of file qshareddata.h.
{ if (d && !d->ref.deref()) delete d; }
| Q_INLINE_TEMPLATE QSharedDataPointer | ( | T * | data | ) | [explicit] |
Definition at line 213 of file qshareddata.h.
: d(adata)
{ if (d) d->ref.ref(); }
| QSharedDataPointer | ( | const QSharedDataPointer< T > & | o | ) | [inline] |
Definition at line 93 of file qshareddata.h.
: d(o.d) { if (d) d->ref.ref(); }
| void detach | ( | ) | [inline] |
Definition at line 75 of file qshareddata.h.
{ if (d && d->ref != 1) detach_helper(); }
| T& operator* | ( | ) | [inline] |
Definition at line 76 of file qshareddata.h.
{ detach(); return *d; }
| const T& operator* | ( | ) | const [inline] |
Definition at line 77 of file qshareddata.h.
{ return *d; }
| T* operator-> | ( | void | ) | [inline] |
Definition at line 78 of file qshareddata.h.
{ detach(); return d; }
| const T* operator-> | ( | void | ) | const [inline] |
Definition at line 79 of file qshareddata.h.
{ return d; }
| operator T * | ( | ) | [inline] |
Definition at line 80 of file qshareddata.h.
{ detach(); return d; }
| operator const T * | ( | ) | const [inline] |
Definition at line 81 of file qshareddata.h.
{ return d; }
| T* data | ( | ) | [inline] |
| const T* data | ( | ) | const [inline] |
| const T* constData | ( | ) | const [inline] |
| bool operator== | ( | const QSharedDataPointer< T > & | other | ) | const [inline] |
Definition at line 86 of file qshareddata.h.
{ return d == other.d; }
| bool operator!= | ( | const QSharedDataPointer< T > & | other | ) | const [inline] |
Definition at line 87 of file qshareddata.h.
{ return d != other.d; }
| QSharedDataPointer<T>& operator= | ( | const QSharedDataPointer< T > & | o | ) | [inline] |
Definition at line 94 of file qshareddata.h.
{
if (o.d != d) {
if (o.d)
o.d->ref.ref();
T *old = d;
d = o.d;
if (old && !old->ref.deref())
delete old;
}
return *this;
}
| QSharedDataPointer& operator= | ( | T * | o | ) | [inline] |
Definition at line 105 of file qshareddata.h.
{
if (o != d) {
if (o)
o->ref.ref();
T *old = d;
d = o;
if (old && !old->ref.deref())
delete old;
}
return *this;
}
| bool operator! | ( | void | ) | const [inline] |
Definition at line 117 of file qshareddata.h.
{ return !d; }
| void swap | ( | QSharedDataPointer< T > & | other | ) | [inline] |
| Q_INLINE_TEMPLATE T * clone | ( | ) | [protected] |