CFx SDK Documentation  2023 SP0
Public Member Functions | List of all members
OdRxObjectPtr Class Reference

#include <RxObject.h>

Inheritance diagram for OdRxObjectPtr:
OdBaseObjectPtr

Public Member Functions

 OdRxObjectPtr ()
 
 OdRxObjectPtr (const OdRxObject *pSource, OdRxObjMod)
 
 OdRxObjectPtr (const OdRxObject *pSource)
 
 OdRxObjectPtr (const OdRxObjectPtr &pSource)
 
 OdRxObjectPtr (const OdBaseObjectPtr &pSource)
 
void attach (const OdRxObject *pObject)
 
 ~OdRxObjectPtr ()
 
void release ()
 
OdRxObjectdetach ()
 
OdRxObjectPtroperator= (const OdRxObjectPtr &source)
 
OdRxObjectPtroperator= (const OdRxObject *source)
 
OdRxObjectPtroperator= (const OdBaseObjectPtr &source)
 
OdRxObjectget ()
 
const OdRxObjectget () const
 
OdRxObjectoperator-> ()
 
const OdRxObjectoperator-> () const
 
 operator OdRxObject * ()
 
 operator const OdRxObject * () const
 
bool operator== (const OdRxObject *pObject) const
 
bool operator!= (const OdRxObject *pObject) const
 
- Public Member Functions inherited from OdBaseObjectPtr
OdRxObjectget () const
 
bool isNull () const
 

Additional Inherited Members

- Protected Member Functions inherited from OdBaseObjectPtr
 OdBaseObjectPtr ()
 
 OdBaseObjectPtr (const OdRxObject *pSource)
 
- Protected Attributes inherited from OdBaseObjectPtr
OdRxObjectm_pObject
 

Detailed Description

<group OdRx_Classes>

This class provides the non-typified implementation of smart pointers for instances of classes derived from the OdRxObject class.

See also
TD_Db
Remarks
SmartPointers relieve the programmer of having to determine when objects are no longer needed, or having to delete them at that time.

Each object referenced by a SmartPointer (henceforth 'referenced object') maintains a reference count; i.e., how many SmartPointers are referencing it.
When the reference counter reaches zero, the referenced object is deleted.

See also
<link smart_pointers_example_refexchange.html, Example of Assigning Smart Pointers>

<link smart_pointers_example_nontypified.html, Example of a Non-Typified Smart Pointer>

See also
<link smart_pointers_overview.html, Overview of Smart Pointer Classes>

The OdSmartPtr class

Definition at line 363 of file RxObject.h.

Constructor & Destructor Documentation

◆ OdRxObjectPtr() [1/5]

OdRxObjectPtr::OdRxObjectPtr ( )
inline

Constructors for the non-typified smart pointer.

Parameters
pSource[in] Pointer to the specified object to be assigned for the new SmartPointer object.
Remarks
If pSourceis specified, the smart pointer is set to the address of the specified object. If pSource is not specified, the smart pointer is set to a NULL.
If OdRxObjMod is specified, the reference counter of the specified object is not incremented.

Definition at line 406 of file RxObject.h.

◆ OdRxObjectPtr() [2/5]

OdRxObjectPtr::OdRxObjectPtr ( const OdRxObject pSource,
OdRxObjMod   
)
inline

Definition at line 407 of file RxObject.h.

◆ OdRxObjectPtr() [3/5]

OdRxObjectPtr::OdRxObjectPtr ( const OdRxObject pSource)
inline

Definition at line 414 of file RxObject.h.

◆ OdRxObjectPtr() [4/5]

OdRxObjectPtr::OdRxObjectPtr ( const OdRxObjectPtr pSource)
inline

Definition at line 421 of file RxObject.h.

◆ OdRxObjectPtr() [5/5]

OdRxObjectPtr::OdRxObjectPtr ( const OdBaseObjectPtr pSource)
inline

Definition at line 428 of file RxObject.h.

◆ ~OdRxObjectPtr()

OdRxObjectPtr::~OdRxObjectPtr ( )
inline

Destructor for the non-typified smart pointer.

Remarks
Decrements the reference counter of the referenced object. When the reference count reaches zero, the referenced object is deleted.

Definition at line 458 of file RxObject.h.

Member Function Documentation

◆ attach()

void OdRxObjectPtr::attach ( const OdRxObject pObject)
inline

Assigns the pointer of the specifed object to the smart pointer without incrementing its reference counter.

Parameters
pObject[in] Pointer to the specified object to be assigned.
Remarks
The reference count of the specified object is not incremented.

If this SmartPointer is currently referencing another object, that object is released prior to the assignment.

See also
<link smart_pointers_example_nontypified.html, Example of a Non-Typified Smart Pointer>

Definition at line 449 of file RxObject.h.

◆ detach()

OdRxObject* OdRxObjectPtr::detach ( )
inline

Releases the smart pointer reference to the referenced object without decrementing of the reference counter.

Returns
Returns the raw pointer to the referenced object. The reference counter is not modified for the referenced object. Smart pointer is set to a NULL.
See also
<link smart_pointers_example_nontypified.html, Example of a Non-Typified Smart Pointer>

Definition at line 485 of file RxObject.h.

◆ get() [1/2]

OdRxObject* OdRxObjectPtr::get ( )
inline

Returns the raw pointer to the referenced object.

Remarks
The smart pointer maintains its reference to the referenced object. The reference counter of the referenced object is not changed.
See also
<link smart_pointers_example_nontypified.html, Example of a Non-Typified Smart Pointer>

Definition at line 522 of file RxObject.h.

◆ get() [2/2]

const OdRxObject* OdRxObjectPtr::get ( ) const
inline

Definition at line 523 of file RxObject.h.

◆ operator const OdRxObject *()

OdRxObjectPtr::operator const OdRxObject * ( ) const
inline

Definition at line 558 of file RxObject.h.

◆ operator OdRxObject *()

OdRxObjectPtr::operator OdRxObject * ( )
inline

Returns the raw pointer of the referenced object.

Remarks
The reference counter of the referenced object is not changed.

Definition at line 556 of file RxObject.h.

◆ operator!=()

bool OdRxObjectPtr::operator!= ( const OdRxObject pObject) const
inline

Definition at line 564 of file RxObject.h.

◆ operator->() [1/2]

OdRxObject* OdRxObjectPtr::operator-> ( )
inline

Returns the raw pointer to the referenced object.

Remarks
The reference counter of the referenced object is not changed.
See also
<link smart_pointers_example_nontypified.html, Example of a Non-Typified Smart Pointer>

Definition at line 534 of file RxObject.h.

◆ operator->() [2/2]

const OdRxObject* OdRxObjectPtr::operator-> ( ) const
inline

Definition at line 535 of file RxObject.h.

◆ operator=() [1/3]

OdRxObjectPtr& OdRxObjectPtr::operator= ( const OdBaseObjectPtr source)
inline

Definition at line 508 of file RxObject.h.

◆ operator=() [2/3]

OdRxObjectPtr& OdRxObjectPtr::operator= ( const OdRxObject source)
inline

Definition at line 504 of file RxObject.h.

◆ operator=() [3/3]

OdRxObjectPtr& OdRxObjectPtr::operator= ( const OdRxObjectPtr source)
inline
Remarks
The assignment operator increments the reference counter of the referenced object and saves its address in the smart pointer. If the smart pointer is currently referencing to another object, that assignment operator releases the referenced object prior to the assignment.
See also
<link smart_pointers_example_nontypified.html, Example of a Non-Typified Smart Pointer>

Definition at line 500 of file RxObject.h.

◆ operator==()

bool OdRxObjectPtr::operator== ( const OdRxObject pObject) const
inline

Definition at line 561 of file RxObject.h.

◆ release()

void OdRxObjectPtr::release ( )
inline

Releases the smart pointer reference to the referenced object.

Remarks
Decrements the reference counter of the referenced object. When the reference count reaches zero, the referenced object is deleted. Smart pointer is set to a NULL.
See also
<link smart_pointers_example_nontypified.html, Example of a Non-Typified Smart Pointer>

Definition at line 826 of file RxObject.h.


The documentation for this class was generated from the following file: