The SharedPtr class is a pointer to an explicitly shared object.
More...
#include <TelepathyQt4/SharedPtr>
List of all members.
Public Member Functions
Static Public Member Functions
Detailed Description
The SharedPtr class is a pointer to an explicitly shared object.
See Shared Pointer Usage
Constructor & Destructor Documentation
Tp::SharedPtr::SharedPtr |
( |
| ) |
[inline] |
Tp::SharedPtr::SharedPtr |
( |
T * |
d | ) |
[inline, explicit] |
template<typename Subclass >
Tp::SharedPtr::SharedPtr |
( |
const SharedPtr< Subclass > & |
o | ) |
[inline] |
Tp::SharedPtr::SharedPtr |
( |
const SharedPtr< T > & |
o | ) |
[inline] |
Tp::SharedPtr::SharedPtr |
( |
const QWeakPointer< T > & |
o | ) |
[inline, explicit] |
Tp::SharedPtr::~SharedPtr |
( |
| ) |
[inline] |
Member Function Documentation
void Tp::SharedPtr::reset |
( |
| ) |
[inline] |
T* Tp::SharedPtr::data |
( |
| ) |
const [inline] |
const T* Tp::SharedPtr::constData |
( |
| ) |
const [inline] |
T* Tp::SharedPtr::operator-> |
( |
| ) |
[inline] |
T* Tp::SharedPtr::operator-> |
( |
| ) |
const [inline] |
bool Tp::SharedPtr::isNull |
( |
| ) |
const [inline] |
bool Tp::SharedPtr::operator! |
( |
| ) |
const [inline] |
Tp::SharedPtr::operator UnspecifiedBoolType |
( |
| ) |
const [inline] |
bool Tp::SharedPtr::operator== |
( |
const SharedPtr< T > & |
o | ) |
const [inline] |
bool Tp::SharedPtr::operator!= |
( |
const SharedPtr< T > & |
o | ) |
const [inline] |
bool Tp::SharedPtr::operator== |
( |
const T * |
ptr | ) |
const [inline] |
bool Tp::SharedPtr::operator!= |
( |
const T * |
ptr | ) |
const [inline] |
void Tp::SharedPtr::swap |
( |
SharedPtr< T > & |
o | ) |
[inline] |
template<class X >
static SharedPtr<T> Tp::SharedPtr::staticCast |
( |
const SharedPtr< X > & |
src | ) |
[inline, static] |
template<class X >
static SharedPtr< T > Tp::SharedPtr::dynamicCast |
( |
const SharedPtr< X > & |
src | ) |
[inline, static] |
Casts the pointer given by src to a pointer pointing to an object of type T. The cast will succeed if the C++ runtime type identification mechanism considers the type T to be the actual runtime type of the object pointed to by src or one of its (possibly indirect) parent classes. Otherwise, a null pointer is returned.
Note that this also allows down-casting a baseclass pointer to a subclass pointer.
This cast method should not be used for QObject-derived classes, as Qt provides a more portable and efficient type identification mechanism, which is used by qObjectCast().
This cast method requires the C++ dynamic runtime type identification facility to be enabled (which might be disabled by eg. the -fno-rtti flag of the GNU G++ compiler).
template<class X >
static SharedPtr<T> Tp::SharedPtr::constCast |
( |
const SharedPtr< X > & |
src | ) |
[inline, static] |
template<class X >
static SharedPtr< T > Tp::SharedPtr::qObjectCast |
( |
const SharedPtr< X > & |
src | ) |
[inline, static] |
Casts the pointer given by src to a pointer pointing to an object of type T. The cast will succeed if the Qt runtime type identification mechanism considers the type T to be the actual runtime type of the object pointed to by src or one of its (possibly indirect) parent classes. Otherwise, a null pointer is returned.
Note that this also allows down-casting a baseclass pointer to a subclass pointer.
This cast method MUST not be used for classes not derived from QObject. However, dynamicCast() provides the same semantics for all classes, provided the C++ runtime type identification facility is enabled. This method, on the other hand, doesn't require the standard C++ facility and is probably also faster for the types it can be used with.