|
CFx SDK Documentation 2026 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 |
| bool | operator! () const |
| operator bool () 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) |
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 129 of file SmartPtr.h.
|
inline |
Definition at line 134 of file SmartPtr.h.
|
inline |
Definition at line 139 of file SmartPtr.h.
|
inline |
Definition at line 145 of file SmartPtr.h.
|
inline |
Definition at line 151 of file SmartPtr.h.
|
inline |
Definition at line 159 of file SmartPtr.h.
|
inline |
Definition at line 165 of file SmartPtr.h.
|
inline |
Definition at line 171 of file SmartPtr.h.
|
inlinenoexcept |
Definition at line 178 of file SmartPtr.h.
|
inline |
Destructor for the typified smart pointer.
Definition at line 230 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 196 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 216 of file SmartPtr.h.
|
inline |
Releases the smart pointer reference to the referenced object without decrementing of the reference counter.
Definition at line 264 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 330 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 315 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.
|
inlineexplicit |
Returns true if and only if the smart pointer stores a non-null pointer.
Definition at line 418 of file SmartPtr.h.
|
inline |
Definition at line 383 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 378 of file SmartPtr.h.
|
inline |
Returns true if and only if the smart pointer stores a NULL.
Definition at line 413 of file SmartPtr.h.
|
inline |
Definition at line 405 of file SmartPtr.h.
|
inline |
Definition at line 400 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 341 of file SmartPtr.h.
|
inline |
Returns the raw pointer to the referenced object.
Definition at line 351 of file SmartPtr.h.
|
inline |
Definition at line 293 of file SmartPtr.h.
|
inline |
Definition at line 279 of file SmartPtr.h.
|
inline |
Definition at line 299 of file SmartPtr.h.
|
inlinenoexcept |
Definition at line 286 of file SmartPtr.h.
|
inline |
Definition at line 395 of file SmartPtr.h.
|
inline |
Definition at line 390 of file SmartPtr.h.
|
inline |
Releases the smart pointer reference to the referenced object.
Definition at line 245 of file SmartPtr.h.