CFx SDK Documentation  2020SP3
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
OdRxObjectImpl< T, TInterface > Class Template Reference

#include <RxObjectImpl.h>

Inheritance diagram for OdRxObjectImpl< T, TInterface >:

Public Member Functions

 OdRxObjectImpl ()
 
void addRef ()
 
void release ()
 
long numRefs () const
 

Static Public Member Functions

static OdSmartPtr< TInterface > createObject ()
 

Protected Member Functions

 ODRX_HEAP_OPERATORS ()
 

Detailed Description

template<class T, class TInterface = T>
class OdRxObjectImpl< T, TInterface >

<group OdRx_Classes>

The template class provides the <link smart_pointers_definition_standard.html, standard implementation of the counting references> for instances of objects derived from the OdRxObject class.

See also
TD_Db
<link smart_pointers_example_count_standard.html, Example of Counting References>
<link smart_pointers_overview.html, Overview of Smart Pointer Classes>

The OdStaticRxObject class

Definition at line 54 of file RxObjectImpl.h.

Constructor & Destructor Documentation

◆ OdRxObjectImpl()

template<class T , class TInterface = T>
OdRxObjectImpl< T, TInterface >::OdRxObjectImpl ( )
inline

Constructor sets the reference counter to one.

Definition at line 73 of file RxObjectImpl.h.

Member Function Documentation

◆ addRef()

template<class T , class TInterface = T>
void OdRxObjectImpl< T, TInterface >::addRef ( )
inline

Increments the reference counter.

Definition at line 81 of file RxObjectImpl.h.

◆ createObject()

template<class T , class TInterface = T>
static OdSmartPtr<TInterface> OdRxObjectImpl< T, TInterface >::createObject ( )
inlinestatic

It is the pseudo-constructor that creates an instance of this class and returns the typified smart pointer to it.

Definition at line 107 of file RxObjectImpl.h.

◆ numRefs()

template<class T , class TInterface = T>
long OdRxObjectImpl< T, TInterface >::numRefs ( ) const
inline

Returns the number of references to an instance of this class.

Definition at line 102 of file RxObjectImpl.h.

◆ ODRX_HEAP_OPERATORS()

template<class T , class TInterface = T>
OdRxObjectImpl< T, TInterface >::ODRX_HEAP_OPERATORS ( )
protected

◆ release()

template<class T , class TInterface = T>
void OdRxObjectImpl< T, TInterface >::release ( )
inline

Decrements the reference counter, checks the reference counter, and destroys the instance when the reference counter reaches zero.

Definition at line 90 of file RxObjectImpl.h.


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