Definition at line 534 of file qsharedpointer_impl.h.
#include <qsharedpointer_impl.h>
Public Types |
|
| typedef T | element_type |
| typedef T | value_type |
| typedef value_type * | pointer |
| typedef const value_type * | const_pointer |
| typedef value_type & | reference |
| typedef const value_type & | const_reference |
| typedef qptrdiff | difference_type |
Public Member Functions |
|
| bool | isNull () const |
| operator RestrictedBool () const | |
| bool | operator! () const |
| T * | data () const |
| QWeakPointer () | |
| ~QWeakPointer () | |
| template<class X > | |
| QWeakPointer (X *ptr) | |
| template<class X > | |
| QWeakPointer & | operator= (X *ptr) |
| QWeakPointer (const QWeakPointer< T > &o) | |
| QWeakPointer< T > & | operator= (const QWeakPointer< T > &o) |
| QWeakPointer (const QSharedPointer< T > &o) | |
| QWeakPointer< T > & | operator= (const QSharedPointer< T > &o) |
| template<class X > | |
| QWeakPointer (const QWeakPointer< X > &o) | |
| template<class X > | |
| QWeakPointer< T > & | operator= (const QWeakPointer< X > &o) |
| template<class X > | |
| bool | operator== (const QWeakPointer< X > &o) const |
| template<class X > | |
| bool | operator!= (const QWeakPointer< X > &o) const |
| template<class X > | |
| QWeakPointer (const QSharedPointer< X > &o) | |
| template<class X > | |
| QWeakPointer< T > & | operator= (const QSharedPointer< X > &o) |
| template<class X > | |
| bool | operator== (const QSharedPointer< X > &o) const |
| template<class X > | |
| bool | operator!= (const QSharedPointer< X > &o) const |
| void | clear () |
| QSharedPointer< T > | toStrongRef () const |
Friends |
|
| class | QSharedPointer |
| typedef T element_type |
Definition at line 542 of file qsharedpointer_impl.h.
| typedef T value_type |
Definition at line 543 of file qsharedpointer_impl.h.
| typedef value_type* pointer |
Definition at line 544 of file qsharedpointer_impl.h.
| typedef const value_type* const_pointer |
Definition at line 545 of file qsharedpointer_impl.h.
| typedef value_type& reference |
Definition at line 546 of file qsharedpointer_impl.h.
| typedef const value_type& const_reference |
Definition at line 547 of file qsharedpointer_impl.h.
| typedef qptrdiff difference_type |
Definition at line 548 of file qsharedpointer_impl.h.
| QWeakPointer | ( | ) | [inline] |
Definition at line 559 of file qsharedpointer_impl.h.
: d(0), value(0) { }
| ~QWeakPointer | ( | ) | [inline] |
Definition at line 560 of file qsharedpointer_impl.h.
| QWeakPointer | ( | X * | ptr | ) | [inline] |
Definition at line 565 of file qsharedpointer_impl.h.
: d(ptr ? d->getAndRef(ptr) : 0), value(ptr)
{ }
| QWeakPointer | ( | const QWeakPointer< T > & | o | ) | [inline] |
Definition at line 572 of file qsharedpointer_impl.h.
| QWeakPointer | ( | const QSharedPointer< T > & | o | ) | [inline] |
| QWeakPointer | ( | const QWeakPointer< X > & | o | ) | [inline] |
Definition at line 589 of file qsharedpointer_impl.h.
: d(0), value(0)
{ *this = o; }
| QWeakPointer | ( | const QSharedPointer< X > & | o | ) | [inline] |
Definition at line 610 of file qsharedpointer_impl.h.
: d(0), value(0)
{ *this = o; }
| bool isNull | ( | ) | const [inline] |
Definition at line 550 of file qsharedpointer_impl.h.
{ return d == 0 || d->strongref == 0 || value == 0; }
| operator RestrictedBool | ( | ) | const [inline] |
Definition at line 552 of file qsharedpointer_impl.h.
{ return isNull() ? 0 : &QWeakPointer::value; }
| bool operator! | ( | void | ) | const [inline] |
Definition at line 556 of file qsharedpointer_impl.h.
{ return isNull(); }
| T* data | ( | ) | const [inline] |
Definition at line 557 of file qsharedpointer_impl.h.
{ return d == 0 || d->strongref == 0 ? 0 : value; }
| QWeakPointer& operator= | ( | X * | ptr | ) | [inline] |
Definition at line 569 of file qsharedpointer_impl.h.
{ return *this = QWeakPointer(ptr); }
| QWeakPointer<T>& operator= | ( | const QWeakPointer< T > & | o | ) | [inline] |
Definition at line 574 of file qsharedpointer_impl.h.
{
internalSet(o.d, o.value);
return *this;
}
| QWeakPointer<T>& operator= | ( | const QSharedPointer< T > & | o | ) | [inline] |
Definition at line 582 of file qsharedpointer_impl.h.
| QWeakPointer<T>& operator= | ( | const QWeakPointer< X > & | o | ) | [inline] |
Definition at line 593 of file qsharedpointer_impl.h.
{
// conversion between X and T could require access to the virtual table
// so force the operation to go through QSharedPointer
*this = o.toStrongRef();
return *this;
}
| bool operator== | ( | const QWeakPointer< X > & | o | ) | const [inline] |
Definition at line 602 of file qsharedpointer_impl.h.
{ return d == o.d && value == static_cast<const T *>(o.value); }
| bool operator!= | ( | const QWeakPointer< X > & | o | ) | const [inline] |
Definition at line 606 of file qsharedpointer_impl.h.
{ return !(*this == o); }
| QWeakPointer<T>& operator= | ( | const QSharedPointer< X > & | o | ) | [inline] |
Definition at line 614 of file qsharedpointer_impl.h.
{
QSHAREDPOINTER_VERIFY_AUTO_CAST(T, X); // if you get an error in this line, the cast is invalid
internalSet(o.d, o.data());
return *this;
}
| bool operator== | ( | const QSharedPointer< X > & | o | ) | const [inline] |
Definition at line 622 of file qsharedpointer_impl.h.
{ return d == o.d; }
| bool operator!= | ( | const QSharedPointer< X > & | o | ) | const [inline] |
Definition at line 626 of file qsharedpointer_impl.h.
{ return !(*this == o); }
| void clear | ( | ) | [inline] |
Definition at line 629 of file qsharedpointer_impl.h.
{ *this = QWeakPointer<T>(); }
| QSharedPointer<T> toStrongRef | ( | ) | const [inline] |
Definition at line 631 of file qsharedpointer_impl.h.
{ return QSharedPointer<T>(*this); }
friend class QSharedPointer
[friend] |
Definition at line 642 of file qsharedpointer_impl.h.