![]() |
TerraLib 4.1
|
#include <TeSharedPtr.h>
Public Member Functions | |
| TeSharedPtr () | |
| Default Constructor( Shared mode ). | |
| TeSharedPtr (T *pointer) | |
| Alternative Constructor( Shared mode ). | |
| TeSharedPtr (const TeSharedPtr< T > &external) | |
| Alternative Constructor. | |
| TeSharedPtr (T &objectReference) | |
| Alternative Constructor( Not-shared mode ). | |
| TeSharedPtr (T *pointer, bool not_shared_flag) | |
| Alternative Constructor. | |
| ~TeSharedPtr () | |
| Default Destructor. | |
| bool | isActive () const |
| Verifies if the current pointer points to an active object. | |
| bool | isShared () const |
| Verifies if the current pointer is shared. | |
| void | reset () |
| Reset the active instance deleting any pointed object if the current instance is in shared mode and no more references to the pointed object exists. | |
| void | reset (T *pointer) |
| Reset the active instance the the new pointer (shared mode). | |
| void | reset (T *pointer, bool not_shared_flag) |
| Reset the active instance the the new pointer. | |
| const TeSharedPtr< T > & | operator= (const TeSharedPtr< T > &external) |
| T & | operator* () const |
| Operator * overload. | |
| T * | operator-> () const |
| Operator -> overload. | |
| bool | operator== (const TeSharedPtr< T > &external) const |
| bool | operator< (const TeSharedPtr< T > &external) const |
| Operator< overload. | |
| bool | operator> (const TeSharedPtr< T > &external) const |
| Operator> overload. | |
| bool | operator!= (const TeSharedPtr< T > &external) const |
| T * | nakedPointer () const |
| A Naked Pointer to the encapsulated object. | |
| unsigned long int | getRefCount () const |
| The number of current references to the pointed object. | |
Protected Member Functions | |
| void | init () |
| Set all internal variables to default values. | |
Protected Attributes | |
| TeMutex | this_lock_instance_ |
| This instance locking mutex. | |
| TeMutex * | counter_lock_instance_ptr_ |
| A pointer to the shared counter locking mutex (default:0). | |
| unsigned long int volatile * | counter_ |
| A pointer to the current number of active users of this pointer (default:0). | |
| T * | reference_ |
| A pointer to the current object encapsulated by this shared pointer (default:0). | |
| bool | not_shared_flag_ |
| A flag indicating if this shared pointer was created by a dynamic assignment ( false value ) or by a static assignment(if true, the encapsulated object will not be deleted when apropriate) (default:false). | |
TePDIClassification_test.cpp, TePDIContrast_test.cpp, TePDICorrelationMatching_test.cpp, TePDIFFT_test.cpp, TePDIFilterMask_test.cpp, TePDIMIMatching_test.cpp, TePDIMMIOMatching_test.cpp, TePDIOFMatching_test.cpp, TePDIPrincipalComponents_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, TePDISegmentation_test.cpp, TePDIUtils_test.cpp, and TePDIWavelets_test.cpp.
| TeSharedPtr< T >::TeSharedPtr | ( | ) | [explicit] |
Default Constructor( Shared mode ).
| TeSharedPtr< T >::TeSharedPtr | ( | T * | pointer | ) | [explicit] |
Alternative Constructor( Shared mode ).
| pointer | A pointer the the active object. |
| TeSharedPtr< T >::TeSharedPtr | ( | const TeSharedPtr< T > & | external | ) |
Alternative Constructor.
| external | External shared pointer reference. |
| TeSharedPtr< T >::TeSharedPtr | ( | T & | objectReference | ) | [explicit] |
Alternative Constructor( Not-shared mode ).
| objectReference | A reference to an existing object. |
| TeSharedPtr< T >::TeSharedPtr | ( | T * | pointer, |
| bool | not_shared_flag | ||
| ) | [explicit] |
Alternative Constructor.
| pointer | A pointer the the active object. |
| not_shared_flag | A flag indication for a static assignment ( the pointed object will not be deleted at the this object destruction ). |
| TeSharedPtr< T >::~TeSharedPtr | ( | ) |
Default Destructor.
| unsigned long int TeSharedPtr< T >::getRefCount | ( | ) | const |
The number of current references to the pointed object.
| void TeSharedPtr< T >::init | ( | ) | [protected] |
Set all internal variables to default values.
| bool TeSharedPtr< T >::isActive | ( | ) | const [inline] |
Verifies if the current pointer points to an active object.
| bool TeSharedPtr< T >::isShared | ( | ) | const [inline] |
Verifies if the current pointer is shared.
| T* TeSharedPtr< T >::nakedPointer | ( | ) | const [inline] |
A Naked Pointer to the encapsulated object.
| bool TeSharedPtr< T >::operator!= | ( | const TeSharedPtr< T > & | external | ) | const [inline] |
| T& TeSharedPtr< T >::operator* | ( | ) | const [inline] |
Operator * overload.
| T* TeSharedPtr< T >::operator-> | ( | ) | const [inline] |
Operator -> overload.
| bool TeSharedPtr< T >::operator< | ( | const TeSharedPtr< T > & | external | ) | const [inline] |
Operator< overload.
| external | The external instance reference. |
| const TeSharedPtr< T > & TeSharedPtr< T >::operator= | ( | const TeSharedPtr< T > & | external | ) |
| bool TeSharedPtr< T >::operator== | ( | const TeSharedPtr< T > & | external | ) | const [inline] |
| bool TeSharedPtr< T >::operator> | ( | const TeSharedPtr< T > & | external | ) | const [inline] |
Operator> overload.
| external | The external instance reference. |
| void TeSharedPtr< T >::reset | ( | T * | pointer | ) | [inline] |
Reset the active instance the the new pointer (shared mode).
| pointer | A pointer the the active object. |
| void TeSharedPtr< T >::reset | ( | T * | pointer, |
| bool | not_shared_flag | ||
| ) |
Reset the active instance the the new pointer.
| pointer | A pointer the the active object. |
| not_shared_flag | A flag indication for a static assignment ( the pointed object will not be deleted at the this object destruction ). |
| void TeSharedPtr< T >::reset | ( | ) | [inline] |
Reset the active instance deleting any pointed object if the current instance is in shared mode and no more references to the pointed object exists.
unsigned long int volatile* TeSharedPtr< T >::counter_ [mutable, protected] |
A pointer to the current number of active users of this pointer (default:0).
TeMutex* TeSharedPtr< T >::counter_lock_instance_ptr_ [mutable, protected] |
A pointer to the shared counter locking mutex (default:0).
bool TeSharedPtr< T >::not_shared_flag_ [mutable, protected] |
A flag indicating if this shared pointer was created by a dynamic assignment ( false value ) or by a static assignment(if true, the encapsulated object will not be deleted when apropriate) (default:false).
T* TeSharedPtr< T >::reference_ [mutable, protected] |
A pointer to the current object encapsulated by this shared pointer (default:0).
TeMutex TeSharedPtr< T >::this_lock_instance_ [mutable, protected] |
This instance locking mutex.