| 
    CFx SDK Documentation
    2022 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) | |
| void | attach (const T *pObject) | 
| void | attach (OdRxObject *pObject) | 
| ~OdSmartPtr () | |
| void | release () | 
| T * | detach () | 
| OdSmartPtr & | operator= (const OdSmartPtr &pObject) | 
| 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) | |
Additional Inherited Members | |
  Protected Attributes inherited from OdBaseObjectPtr | |
| OdRxObject * | m_pObject | 
<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.
      
  | 
  inline | 
Destructor for the typified smart pointer.
Definition at line 249 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 215 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 235 of file SmartPtr.h.
      
  | 
  inline | 
Releases the smart pointer reference to the referenced object without decrementing of the reference counter.
Definition at line 283 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 326 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 394 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 389 of file SmartPtr.h.
      
  | 
  inlineprotected | 
Declared private to prevent use.
Definition at line 124 of file SmartPtr.h.
      
  | 
  inline | 
Definition at line 416 of file SmartPtr.h.
      
  | 
  inline | 
Definition at line 411 of file SmartPtr.h.
      
  | 
  inline | 
Returns the raw pointer to the referenced object.
Definition at line 352 of file SmartPtr.h.
      
  | 
  inline | 
Returns the raw pointer to the referenced object.
Definition at line 362 of file SmartPtr.h.
      
  | 
  inline | 
Definition at line 304 of file SmartPtr.h.
      
  | 
  inline | 
Definition at line 298 of file SmartPtr.h.
      
  | 
  inline | 
Definition at line 310 of file SmartPtr.h.
      
  | 
  inline | 
Definition at line 406 of file SmartPtr.h.
      
  | 
  inline | 
Definition at line 401 of file SmartPtr.h.
      
  | 
  inline | 
Releases the smart pointer reference to the referenced object.
Definition at line 264 of file SmartPtr.h.