CFx SDK Documentation 2024 SP0
|
#include <SmartPtr.h>
Public Member Functions | |
OdSmartPtr () | |
OdSmartPtr (const T *pObject, OdRxObjMod) | |
OdSmartPtr (const T *pObject) | |
OdSmartPtr (const OdRxObject *pObject) | |
OdSmartPtr (OdRxObject *pObject, OdRxObjMod) | |
OdSmartPtr (const OdSmartPtr &pObject) | |
OdSmartPtr (const OdRxObjectPtr &pObject) | |
OdSmartPtr (const OdBaseObjectPtr &pObject) | |
OdSmartPtr (OdSmartPtr &&pObject) noexcept | |
void | attach (const T *pObject) |
void | attach (OdRxObject *pObject) |
~OdSmartPtr () | |
void | release () |
T * | detach () |
OdSmartPtr & | operator= (const OdSmartPtr &pObject) |
OdSmartPtr & | operator= (OdSmartPtr &&pObject) noexcept |
OdSmartPtr & | operator= (const OdBaseObjectPtr &pObject) |
OdSmartPtr & | operator= (const T *pObject) |
const T * | get () const |
T * | get () |
T * | operator-> () |
const T * | operator-> () const |
operator T* () | |
operator const T * () const | |
bool | operator== (const void *pObject) const |
bool | operator== (const OdSmartPtr &pObject) const |
bool | operator!= (const void *pObject) const |
bool | operator!= (const OdSmartPtr &pObject) const |
Public Member Functions inherited from OdBaseObjectPtr | |
OdRxObject * | get () const |
bool | isNull () const |
Protected Member Functions | |
void | internalAddRef () |
void | assign (const T *pObject) |
void | internalQueryX (const OdRxObject *pObject) |
void | assign (const OdRxObject *pObject) |
bool | operator! () const |
operator bool () const | |
operator bool () | |
Protected Member Functions inherited from OdBaseObjectPtr | |
OdBaseObjectPtr () | |
OdBaseObjectPtr (const OdRxObject *pSource) | |
OdBaseObjectPtr (OdBaseObjectPtr &&pObject) noexcept | |
OdBaseObjectPtr & | operator= (OdBaseObjectPtr &&pObject) noexcept |
Additional Inherited Members | |
Protected Attributes inherited from OdBaseObjectPtr | |
OdRxObject * | m_pObject = nullptr |
<group Other_Classes>
This template class provides the typified implementation of smart pointers for instances of classes derived from the OdRxObject class.
Each object referenced by a SmartPointer (henceforth 'referenced object') maintains a reference count; i.e., how many SmartPointers are referencing it. When the reference count reaches zero, the referenced object is deleted.
<link smart_pointers_example_typified.html, Example of a Typified Smart Pointer>
The OdRxObjectPtr class
Definition at line 57 of file SmartPtr.h.
|
inline |
Constructors for the typified smart pointer.
pObject | [in] Pointer to the object to be assigned to the new SmartPointer object. |
Definition at line 153 of file SmartPtr.h.
|
inline |
Definition at line 158 of file SmartPtr.h.
|
inline |
Definition at line 163 of file SmartPtr.h.
|
inline |
Definition at line 169 of file SmartPtr.h.
|
inline |
Definition at line 175 of file SmartPtr.h.
|
inline |
Definition at line 183 of file SmartPtr.h.
|
inline |
Definition at line 189 of file SmartPtr.h.
|
inline |
Definition at line 195 of file SmartPtr.h.
|
inlinenoexcept |
Definition at line 202 of file SmartPtr.h.
|
inline |
Destructor for the typified smart pointer.
Definition at line 254 of file SmartPtr.h.
|
inlineprotected |
Definition at line 110 of file SmartPtr.h.
|
inlineprotected |
Assigns the pointer of specified object to the smart pointer.
If this SmartPointer is currently referencing another object, that object is released prior to the assignment.
pObject | [in] Pointer to the specified object to be assigned. |
Definition at line 80 of file SmartPtr.h.
|
inline |
Assigns the pointer of the specifed object to the smart pointer without incrementing its reference counter.
pObject | [in] Pointer to the specifed object to be assigned. |
If the smart pointer is currently referencing to another object, that object is released prior to the assignment.
Definition at line 220 of file SmartPtr.h.
|
inline |
Assigns the pointer of the specifed object to the smart pointer without incrementing its reference counter.
pObject | [in] Pointer to the specifed object to be assigned. |
If the smart pointer is currently referencing to another object, that object is released prior to the assignment.
Definition at line 240 of file SmartPtr.h.
|
inline |
Releases the smart pointer reference to the referenced object without decrementing of the reference counter.
Definition at line 288 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 354 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 339 of file SmartPtr.h.
|
inlineprotected |
Increments the reference counter of the referenced object.
Definition at line 63 of file SmartPtr.h.
|
inlineprotected |
Performs a "safe" assignment of the specified object to this SmartPointer object.
pObject | [in] Pointer to the object to be assigned. |
Throws: eNotThatKindOfClass if not successful.
Definition at line 98 of file SmartPtr.h.
|
inlineprotected |
Declared private to prevent use.
Definition at line 138 of file SmartPtr.h.
|
inlineprotected |
Declared private to prevent use.
Definition at line 131 of file SmartPtr.h.
|
inline |
Definition at line 407 of file SmartPtr.h.
|
inline |
Returns the raw pointer the referenced object.
The reference counter of the referenced object is not changed.
Definition at line 402 of file SmartPtr.h.
|
inlineprotected |
Declared private to prevent use.
Definition at line 124 of file SmartPtr.h.
|
inline |
Definition at line 429 of file SmartPtr.h.
|
inline |
Definition at line 424 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 365 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 375 of file SmartPtr.h.
|
inline |
Definition at line 317 of file SmartPtr.h.
|
inline |
Definition at line 303 of file SmartPtr.h.
|
inline |
Definition at line 323 of file SmartPtr.h.
|
inlinenoexcept |
Definition at line 310 of file SmartPtr.h.
|
inline |
Definition at line 419 of file SmartPtr.h.
|
inline |
Definition at line 414 of file SmartPtr.h.
|
inline |
Releases the smart pointer reference to the referenced object.
Definition at line 269 of file SmartPtr.h.