CFx SDK Documentation 2024 SP0
|
#include <SharedPtr.h>
Public Member Functions | |
OdSharedPtr () | |
OdSharedPtr (T *pObject) | |
OdSharedPtr (const OdSharedPtr &other) | |
~OdSharedPtr () | |
OdSharedPtr & | operator= (const OdSharedPtr &other) |
T * | operator-> () |
T * | get () |
const T * | get () const |
operator T* () | |
operator const T * () const | |
const T * | operator-> () const |
T & | operator* () |
const T & | operator* () const |
bool | isNull () const |
T * | detach () |
int | refCount () const |
This template class implements SharedPointers for instances not derived from OdRxObject.
Each object referenced by a SharedPointer (henceforth 'referenced object') has associated with it a reference count; i.e., how many SharedPointers are referencing it. When the reference count reaches zero, the referenced object is deleted.
Corresponding C++ library: TD_Root <group Other_Classes>
Definition at line 48 of file SharedPtr.h.
|
inline |
Definition at line 52 of file SharedPtr.h.
|
inline |
Definition at line 54 of file SharedPtr.h.
|
inline |
Definition at line 66 of file SharedPtr.h.
|
inline |
When the reference count reaches zero, the referenced object is deleted.
Definition at line 82 of file SharedPtr.h.
|
inline |
Detaches referenced object from the pointer. Warning: this method may be used only if reference count is 1 (i.e. when this pointer is the single owner of the referenced object)
Definition at line 170 of file SharedPtr.h.
|
inline |
Returns the object referenced by this SharedPointer.
Definition at line 134 of file SharedPtr.h.
|
inline |
Returns the object referenced by this SharedPointer.
Definition at line 143 of file SharedPtr.h.
|
inline |
Returns true if and only if this SharedPointer contains a null reference.
Definition at line 163 of file SharedPtr.h.
|
inline |
Definition at line 146 of file SharedPtr.h.
|
inline |
Definition at line 145 of file SharedPtr.h.
|
inline |
Definition at line 156 of file SharedPtr.h.
|
inline |
Definition at line 158 of file SharedPtr.h.
|
inline |
Returns the object referenced by this SharedPointer.
Definition at line 125 of file SharedPtr.h.
|
inline |
Returns the object referenced by this SharedPointer.
Definition at line 154 of file SharedPtr.h.
|
inline |
Definition at line 91 of file SharedPtr.h.
|
inline |
Returns the number of references to the object.
Definition at line 187 of file SharedPtr.h.