#include <daeSmartRef.h>
Public Member Functions | |
T * | cast () const |
daeSmartRef (T *ptr) | |
daeSmartRef (const daeSmartRef< T > &smartRef) | |
template<class U > | |
daeSmartRef (const daeSmartRef< U > &smartRef) | |
daeSmartRef () | |
operator T * () const | |
T * | operator-> () const |
const daeSmartRef< T > & | operator= (T *ptr) |
const daeSmartRef< T > & | operator= (const daeSmartRef< T > &other) |
template<class U > | |
const daeSmartRef< T > & | operator= (const daeSmartRef< U > &smartRef) |
~daeSmartRef () | |
Static Public Member Functions | |
template<class U > | |
static T * | staticCast (const daeSmartRef< U > &smartRef) |
Private Attributes | |
T * | _ptr |
The daeSmartRef
template class automates reference counting for objects derived from daeRefCountedObj
.
Definition at line 19 of file daeSmartRef.h.
daeSmartRef< T >::daeSmartRef | ( | ) | [inline] |
Constructor
Definition at line 25 of file daeSmartRef.h.
daeSmartRef< T >::~daeSmartRef | ( | ) | [inline] |
Destructor
Definition at line 30 of file daeSmartRef.h.
daeSmartRef< T >::daeSmartRef | ( | const daeSmartRef< U > & | smartRef | ) | [inline] |
Copy Constructor that will convert from one template to the other.
smartRef | a daeSmartRef to the object to copy from. |
Definition at line 39 of file daeSmartRef.h.
daeSmartRef< T >::daeSmartRef | ( | const daeSmartRef< T > & | smartRef | ) | [inline] |
Copy Constructor.
smartRef | a daeSmartRef of the same template type to copy from |
Definition at line 53 of file daeSmartRef.h.
daeSmartRef< T >::daeSmartRef | ( | T * | ptr | ) | [inline] |
Constructor
ptr | a pointer to an object of the same template type. |
Definition at line 61 of file daeSmartRef.h.
T* daeSmartRef< T >::cast | ( | ) | const [inline] |
Function that returns a pointer to object being reference counted.
Definition at line 47 of file daeSmartRef.h.
daeSmartRef< T >::operator T * | ( | ) | const [inline] |
Overloaded cast operator.
Definition at line 112 of file daeSmartRef.h.
T* daeSmartRef< T >::operator-> | ( | ) | const [inline] |
Overloaded member selection operator.
Definition at line 105 of file daeSmartRef.h.
const daeSmartRef<T>& daeSmartRef< T >::operator= | ( | T * | ptr | ) | [inline] |
Overloaded assignment operator.
ptr | a pointer to the object to copy from. Must be of the same template type. |
Definition at line 95 of file daeSmartRef.h.
const daeSmartRef<T>& daeSmartRef< T >::operator= | ( | const daeSmartRef< T > & | other | ) | [inline] |
Overloaded assignment operator.
other | a daeSmartRef to the object to copy from. Must be of the same template type. |
Definition at line 83 of file daeSmartRef.h.
const daeSmartRef<T>& daeSmartRef< T >::operator= | ( | const daeSmartRef< U > & | smartRef | ) | [inline] |
Overloaded assignment operator which will convert between template types.
smartRef | a daeSmartRef to the object to copy from. |
Definition at line 71 of file daeSmartRef.h.
static T* daeSmartRef< T >::staticCast | ( | const daeSmartRef< U > & | smartRef | ) | [inline, static] |
Static cast function.
smartRef | a smartRef to cast from |
Definition at line 121 of file daeSmartRef.h.
T* daeSmartRef< T >::_ptr [private] |
Definition at line 126 of file daeSmartRef.h.