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 70 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 127 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 175 of file extendptr.hpp.
| bool QExtend::ExtendPtr< T, DeletePolicy >::isNull | ( | ) | const [inline] |
Test if the pointer is null.
Definition at line 198 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 209 of file extendptr.hpp.
| QExtend::ExtendPtr< T, DeletePolicy >::operator const T * | ( | ) | const [inline] |
Cast to the const object pointer.
Definition at line 231 of file extendptr.hpp.
| QExtend::ExtendPtr< T, DeletePolicy >::operator T * | ( | ) | [inline] |
Cast to the object pointer.
Definition at line 220 of file extendptr.hpp.
| T& QExtend::ExtendPtr< T, DeletePolicy >::operator* | ( | ) | [inline] |
Indirection Operator.
Definition at line 291 of file extendptr.hpp.
| const T& QExtend::ExtendPtr< T, DeletePolicy >::operator* | ( | ) | const [inline] |
Indirection Operator.
Definition at line 311 of file extendptr.hpp.
| const T* QExtend::ExtendPtr< T, DeletePolicy >::operator-> | ( | ) | const [inline] |
Indirection Operator.
Definition at line 271 of file extendptr.hpp.
| T* QExtend::ExtendPtr< T, DeletePolicy >::operator-> | ( | ) | [inline] |
Indirection Operator.
Definition at line 252 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 150 of file extendptr.hpp.
© 2000-2025 - www.developpez.com