QObject Smart pointer which create an object and synchronize its life time. //! More...
#include <extendptr.hpp>
Classes | |
struct | interptr |
struct | interptr< false, TPTR > |
struct | interptr< true, TPTR > |
Public Member Functions | |
ExtendPtr (T *p=0) | |
Smart pointer Constructor. //! | |
ExtendPtr< T, DeletePolicy > & | operator= (T *p) |
Reassigne pointer to a new object. Use Delete policy on old pointer. //! | |
~ExtendPtr () | |
Smart pointer Destructor. Use DeletePolicy to decide if object should be deleted. //! | |
bool | isNull () const |
Test if the pointer is null. //! | |
operator bool () const | |
Bool convertion. It's true if object is not destroyed (Parent destruction). //! | |
operator T * () | |
Cast to the object pointer. //! | |
operator const T * () const | |
Cast to the const object pointer. //! | |
T * | operator-> () |
Indirection Operator. //! | |
const T * | operator-> () const |
Indirection Operator. //! | |
T & | operator* () |
Indirection Operator. //! | |
const T & | operator* () const |
Indirection Operator. //! |
QObject Smart pointer which create an object and synchronize its life time. //!
ExtendPtr is use to interface an object and use a policy for object destruction. Proposed features are :
T | Object type. | |
DeletePolicy | delete object policy used. Defaut is SCOPE policy. |
Definition at line 68 of file extendptr.hpp.
QExtend::ExtendPtr< T, DeletePolicy >::ExtendPtr | ( | T * | p = 0 |
) | [inline] |
Smart pointer Constructor. //!
Create Object with its default constructor.
p | Object pointer. |
Definition at line 121 of file extendptr.hpp.
QExtend::ExtendPtr< T, DeletePolicy >::~ExtendPtr | ( | ) | [inline] |
Smart pointer Destructor. Use DeletePolicy to decide if object should be deleted. //!
Delete Object.
Definition at line 161 of file extendptr.hpp.
bool QExtend::ExtendPtr< T, DeletePolicy >::isNull | ( | ) | const [inline] |
Test if the pointer is null. //!
Definition at line 180 of file extendptr.hpp.
QExtend::ExtendPtr< T, DeletePolicy >::operator bool | ( | ) | const [inline] |
Bool convertion. It's true if object is not destroyed (Parent destruction). //!
Definition at line 187 of file extendptr.hpp.
QExtend::ExtendPtr< T, DeletePolicy >::operator const T * | ( | ) | const [inline] |
Cast to the const object pointer. //!
Definition at line 201 of file extendptr.hpp.
QExtend::ExtendPtr< T, DeletePolicy >::operator T * | ( | ) | [inline] |
Cast to the object pointer. //!
Definition at line 194 of file extendptr.hpp.
T& QExtend::ExtendPtr< T, DeletePolicy >::operator* | ( | ) | [inline] |
Indirection Operator. //!
Definition at line 249 of file extendptr.hpp.
const T& QExtend::ExtendPtr< T, DeletePolicy >::operator* | ( | ) | const [inline] |
Indirection Operator. //!
Definition at line 265 of file extendptr.hpp.
const T* QExtend::ExtendPtr< T, DeletePolicy >::operator-> | ( | ) | const [inline] |
Indirection Operator. //!
Definition at line 233 of file extendptr.hpp.
T* QExtend::ExtendPtr< T, DeletePolicy >::operator-> | ( | ) | [inline] |
Indirection Operator. //!
Definition at line 218 of file extendptr.hpp.
ExtendPtr<T,DeletePolicy>& QExtend::ExtendPtr< T, DeletePolicy >::operator= | ( | T * | p | ) | [inline] |
Reassigne pointer to a new object. Use Delete policy on old pointer. //!
Create Object with its default constructor.
p | New object pointer. |
Definition at line 140 of file extendptr.hpp.
Les sources présentées sur cette page sont libres de droits et vous pouvez les utiliser à votre convenance. Par contre, la page de présentation constitue une œuvre intellectuelle protégée par les droits d'auteur. Copyright © 2010 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site ni de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon vous encourez selon la loi jusqu'à trois ans de prison et jusqu'à 300 000 € de dommages et intérêts.