CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
OdClsIdSmartPtr< ClsIdRetriever, T > Class Template Reference

#include <SmartClsIdPtr.h>

Inheritance diagram for OdClsIdSmartPtr< ClsIdRetriever, T >:
OdBaseObjectPtr

Public Member Functions

 OdClsIdSmartPtr ()
 
 OdClsIdSmartPtr (const T *pObject, OdRxObjMod)
 
 OdClsIdSmartPtr (const T *pObject)
 
 OdClsIdSmartPtr (const OdRxObject *pObject)
 
 OdClsIdSmartPtr (OdRxObject *pObject, OdRxObjMod)
 
 OdClsIdSmartPtr (const OdClsIdSmartPtr &pObject)
 
 OdClsIdSmartPtr (const OdRxObjectPtr &pObject)
 
 OdClsIdSmartPtr (const OdBaseObjectPtr &pObject)
 
void attach (const T *pObject)
 
void attach (OdRxObject *pObject)
 
 ~OdClsIdSmartPtr ()
 
void release ()
 
T * detach ()
 
OdClsIdSmartPtroperator= (const OdClsIdSmartPtr &pObject)
 
OdClsIdSmartPtroperator= (const OdBaseObjectPtr &pObject)
 
OdClsIdSmartPtroperator= (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 *p) const
 
bool operator== (const OdClsIdSmartPtr &ptr) const
 
bool operator!= (const void *p) const
 
bool operator!= (const OdClsIdSmartPtr &ptr) const
 
- Public Member Functions inherited from OdBaseObjectPtr
OdRxObjectget () const
 
bool isNull () const
 

Static Public Member Functions

static const OdRxClassclassId ()
 
static OdClsIdSmartPtr cast (const OdRxObject *pObject)
 

Additional Inherited Members

- Protected Member Functions inherited from OdBaseObjectPtr
 OdBaseObjectPtr ()
 
 OdBaseObjectPtr (const OdRxObject *pSource)
 
 OdBaseObjectPtr (OdBaseObjectPtr &&pObject) noexcept
 
OdBaseObjectPtroperator= (OdBaseObjectPtr &&pObject) noexcept
 
- Protected Attributes inherited from OdBaseObjectPtr
OdRxObjectm_pObject = nullptr
 

Detailed Description

template<class ClsIdRetriever, class T>
class OdClsIdSmartPtr< ClsIdRetriever, T >

This template class implements SmartPointers for Class ID objects. This class is the ClassIdSmartPointer template class.

<group Other_Classes>

Definition at line 59 of file SmartClsIdPtr.h.

Constructor & Destructor Documentation

◆ OdClsIdSmartPtr() [1/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( )
inline
Parameters
pObject[in] Pointer to the object to be assigned to the new SmartPointer object.
Remarks
If pObject is specified, the specified object is assigned to this SmartPointer object.
If OdRxObjMod or const OdBaseObjectPtr& are specified, the reference count of the referenced object is not incremented.

Definition at line 139 of file SmartClsIdPtr.h.

◆ OdClsIdSmartPtr() [2/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( const T *  pObject,
OdRxObjMod   
)
inline

Definition at line 141 of file SmartClsIdPtr.h.

◆ OdClsIdSmartPtr() [3/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( const T *  pObject)
inline

Definition at line 143 of file SmartClsIdPtr.h.

◆ OdClsIdSmartPtr() [4/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( const OdRxObject pObject)
inline

Definition at line 145 of file SmartClsIdPtr.h.

◆ OdClsIdSmartPtr() [5/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( OdRxObject pObject,
OdRxObjMod   
)
inline

Definition at line 155 of file SmartClsIdPtr.h.

◆ OdClsIdSmartPtr() [6/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( const OdClsIdSmartPtr< ClsIdRetriever, T > &  pObject)
inline

Definition at line 162 of file SmartClsIdPtr.h.

◆ OdClsIdSmartPtr() [7/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( const OdRxObjectPtr pObject)
inline

Definition at line 168 of file SmartClsIdPtr.h.

◆ OdClsIdSmartPtr() [8/8]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::OdClsIdSmartPtr ( const OdBaseObjectPtr pObject)
inline

Definition at line 170 of file SmartClsIdPtr.h.

◆ ~OdClsIdSmartPtr()

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::~OdClsIdSmartPtr ( )
inline
Remarks
Decrements the reference count of the object referenced by this SmartPointer object.

When the reference count reaches zero, the referenced object is deleted.

Definition at line 218 of file SmartClsIdPtr.h.

Member Function Documentation

◆ attach() [1/2]

template<class ClsIdRetriever , class T >
void OdClsIdSmartPtr< ClsIdRetriever, T >::attach ( const T *  pObject)
inline

Assigns the specified object to this SmartPointer object.

Parameters
pObject[in] Pointer to the 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.

Definition at line 191 of file SmartClsIdPtr.h.

◆ attach() [2/2]

template<class ClsIdRetriever , class T >
void OdClsIdSmartPtr< ClsIdRetriever, T >::attach ( OdRxObject pObject)
inline

Assigns the specified object to this SmartPointer object.

Parameters
pObject[in] Pointer to the 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.

Definition at line 204 of file SmartClsIdPtr.h.

◆ cast()

template<class ClsIdRetriever , class T >
static OdClsIdSmartPtr OdClsIdSmartPtr< ClsIdRetriever, T >::cast ( const OdRxObject pObject)
inlinestatic

Definition at line 172 of file SmartClsIdPtr.h.

◆ classId()

template<class ClsIdRetriever , class T >
static const OdRxClass * OdClsIdSmartPtr< ClsIdRetriever, T >::classId ( )
inlinestatic

Returns the OdRxClass of the object referenced by this SmartPointer object.

Definition at line 150 of file SmartClsIdPtr.h.

◆ detach()

template<class ClsIdRetriever , class T >
T * OdClsIdSmartPtr< ClsIdRetriever, T >::detach ( )
inline

Releases this SmartPointer's reference to the referenced object.

Returns
Returns the object referenced by this SmartPointer object.
Remarks
The referenced object's reference count is not modified.

Definition at line 245 of file SmartClsIdPtr.h.

◆ get() [1/2]

template<class ClsIdRetriever , class T >
T * OdClsIdSmartPtr< ClsIdRetriever, T >::get ( )
inline

Returns the object referenced by this SmartPointer object.

Remarks
This SmartPointer maintains its reference to the referenced object.

The reference count of the referenced object is unchanged.

Definition at line 279 of file SmartClsIdPtr.h.

◆ get() [2/2]

template<class ClsIdRetriever , class T >
const T * OdClsIdSmartPtr< ClsIdRetriever, T >::get ( ) const
inline

Returns the object referenced by this SmartPointer object.

Remarks
This SmartPointer maintains its reference to the referenced object.

The reference count of the referenced object is unchanged.

Definition at line 269 of file SmartClsIdPtr.h.

◆ operator const T *()

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::operator const T * ( ) const
inline

Returns the object referenced by this SmartPointer object.

Remarks
The reference count of the referenced object is unchanged.

Definition at line 319 of file SmartClsIdPtr.h.

◆ operator T*()

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr< ClsIdRetriever, T >::operator T* ( )
inline

Returns the object referenced by this SmartPointer object.

Remarks
This SmartPointer maintains its reference to the referenced object.

The reference count of the referenced object is unchanged.

Definition at line 311 of file SmartClsIdPtr.h.

◆ operator!=() [1/2]

template<class ClsIdRetriever , class T >
bool OdClsIdSmartPtr< ClsIdRetriever, T >::operator!= ( const OdClsIdSmartPtr< ClsIdRetriever, T > &  ptr) const
inline

Definition at line 328 of file SmartClsIdPtr.h.

◆ operator!=() [2/2]

template<class ClsIdRetriever , class T >
bool OdClsIdSmartPtr< ClsIdRetriever, T >::operator!= ( const void p) const
inline

Definition at line 326 of file SmartClsIdPtr.h.

◆ operator->() [1/2]

template<class ClsIdRetriever , class T >
T * OdClsIdSmartPtr< ClsIdRetriever, T >::operator-> ( )
inline

Returns the object referenced by this SmartPointer object.

Remarks
The reference count of the referenced object is unchanged.

Definition at line 287 of file SmartClsIdPtr.h.

◆ operator->() [2/2]

template<class ClsIdRetriever , class T >
const T * OdClsIdSmartPtr< ClsIdRetriever, T >::operator-> ( ) const
inline

Definition at line 289 of file SmartClsIdPtr.h.

◆ operator=() [1/3]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr & OdClsIdSmartPtr< ClsIdRetriever, T >::operator= ( const OdBaseObjectPtr pObject)
inline

Definition at line 255 of file SmartClsIdPtr.h.

◆ operator=() [2/3]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr & OdClsIdSmartPtr< ClsIdRetriever, T >::operator= ( const OdClsIdSmartPtr< ClsIdRetriever, T > &  pObject)
inline

Definition at line 252 of file SmartClsIdPtr.h.

◆ operator=() [3/3]

template<class ClsIdRetriever , class T >
OdClsIdSmartPtr & OdClsIdSmartPtr< ClsIdRetriever, T >::operator= ( const T *  pObject)
inline

Definition at line 258 of file SmartClsIdPtr.h.

◆ operator==() [1/2]

template<class ClsIdRetriever , class T >
bool OdClsIdSmartPtr< ClsIdRetriever, T >::operator== ( const OdClsIdSmartPtr< ClsIdRetriever, T > &  ptr) const
inline

Definition at line 324 of file SmartClsIdPtr.h.

◆ operator==() [2/2]

template<class ClsIdRetriever , class T >
bool OdClsIdSmartPtr< ClsIdRetriever, T >::operator== ( const void p) const
inline

Definition at line 322 of file SmartClsIdPtr.h.

◆ release()

template<class ClsIdRetriever , class T >
void OdClsIdSmartPtr< ClsIdRetriever, T >::release ( )
inline

Releases this SmartPointer's reference to the referenced object.

Remarks
Decrements the reference count of the referenced object.

When the reference count reaches zero, the referenced object is deleted.

Definition at line 228 of file SmartClsIdPtr.h.


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