DWFCore::DWFParameterizedCountedObjectPointer< T > Class Template Reference

#include "dwfcore/CountedObject.h"

Inheritance diagram for DWFCore::DWFParameterizedCountedObjectPointer< T >:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFParameterizedCountedObjectPointer< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class DWFCore::DWFParameterizedCountedObjectPointer< T >

Smart pointer template for objects with a reference counted base class.

Since:
1.0.1
This class wraps a pointer to a referenced counted object. It will perform some reference counting and if appropriate delete the pointer.
Parameters:
T Must specialize DWFCountedObject.

Definition at line 435 of file CountedObject.h.

Public Member Functions

 DWFParameterizedCountedObjectPointer (T *pObject) throw ()
virtual ~DWFParameterizedCountedObjectPointer () throw ()
 DWFParameterizedCountedObjectPointer (const DWFParameterizedCountedObjectPointer &rSrc) throw ()
DWFParameterizedCountedObjectPointeroperator= (const DWFParameterizedCountedObjectPointer &rSrc) throw ()
 operator T * () const throw ()
 operator const T * () const throw ()
 operator T & () const throw ()
 operator const T & () const throw ()
T * operator-> () const throw ()
bool operator== (const DWFParameterizedCountedObjectPointer &rRHS) const throw ()

Friends

bool operator!= (const DWFParameterizedCountedObjectPointer &rLHS, const DWFParameterizedCountedObjectPointer &rRHS) throw ()


Constructor & Destructor Documentation

template<class T>
DWFCore::DWFParameterizedCountedObjectPointer< T >::DWFParameterizedCountedObjectPointer T *  pObject  )  throw () [inline]
 

Constructor This constructor will add a reference to the incoming object.

Parameters:
pObject A pointer to the reference counted object to manage. The reference count of pObject will be incremented. The allocation of this object should match the deallocator used in DWFCountedObject::destroy(), the default is the DWFCORE_ALLOC_OBJECT macro.
Exceptions:
None 

Definition at line 452 of file CountedObject.h.

template<class T>
virtual DWFCore::DWFParameterizedCountedObjectPointer< T >::~DWFParameterizedCountedObjectPointer  )  throw () [inline, virtual]
 

Destructor Decrements the reference count of the managed object and will delete it when no references remain.

Exceptions:
None 

Definition at line 464 of file CountedObject.h.

template<class T>
DWFCore::DWFParameterizedCountedObjectPointer< T >::DWFParameterizedCountedObjectPointer const DWFParameterizedCountedObjectPointer< T > &  rSrc  )  throw () [inline]
 

Copy Constructor This constructor will add a reference to the managed object.

Parameters:
rSrc The smart pointer object to copy from. The managed pointer will be assigned to this object and the reference count will be incremented.
Exceptions:
None 

Definition at line 477 of file CountedObject.h.


Member Function Documentation

template<class T>
DWFCore::DWFParameterizedCountedObjectPointer< T >::operator const T &  )  const throw () [inline]
 

Constant Reference Cast Operator Used to cast a smart pointer object to the reference type T managed pointer.

Returns:
The managed object reference.
Exceptions:
None 

Definition at line 546 of file CountedObject.h.

template<class T>
DWFCore::DWFParameterizedCountedObjectPointer< T >::operator const T *  )  const throw () [inline]
 

Constant Cast Operator Used to cast a smart pointer object to the type T managed pointer.

Returns:
The managed object pointer.
Exceptions:
None 

Definition at line 520 of file CountedObject.h.

template<class T>
DWFCore::DWFParameterizedCountedObjectPointer< T >::operator T &  )  const throw () [inline]
 

Reference Cast Operator Used to cast a smart pointer object to the reference type T managed pointer.

Returns:
The managed object reference.
Exceptions:
None 

Definition at line 533 of file CountedObject.h.

template<class T>
DWFCore::DWFParameterizedCountedObjectPointer< T >::operator T *  )  const throw () [inline]
 

Cast Operator Used to cast a smart pointer object to the type T managed pointer.

Returns:
The managed object pointer.
Exceptions:
None 

Definition at line 507 of file CountedObject.h.

template<class T>
T* DWFCore::DWFParameterizedCountedObjectPointer< T >::operator->  )  const throw () [inline]
 

Member Operator Used to cast a smart pointer object to the type T managed pointer.

Returns:
The managed object pointer.
Exceptions:
None 

Definition at line 559 of file CountedObject.h.

template<class T>
DWFParameterizedCountedObjectPointer& DWFCore::DWFParameterizedCountedObjectPointer< T >::operator= const DWFParameterizedCountedObjectPointer< T > &  rSrc  )  throw () [inline]
 

Assignment Operator This operator will add a reference to the managed object.

Parameters:
rSrc The smart pointer object to copy from. The managed pointer will be assigned to this object and the reference count will be incremented.
Exceptions:
None 

Definition at line 493 of file CountedObject.h.

template<class T>
bool DWFCore::DWFParameterizedCountedObjectPointer< T >::operator== const DWFParameterizedCountedObjectPointer< T > &  rRHS  )  const throw () [inline]
 

Equality Operator Used to determine if two managed object pointers are identical. This method does not dereference or evaluate the two pointers, only the memory addresses are compared.

Parameters:
rRHS The smart pointer object to compare against.
Returns:
true if the managed object pointers are the same, false otherwise.
Exceptions:
None 

Definition at line 577 of file CountedObject.h.


Friends And Related Function Documentation

template<class T>
bool operator!= const DWFParameterizedCountedObjectPointer< T > &  rLHS,
const DWFParameterizedCountedObjectPointer< T > &  rRHS
throw () [friend]
 

Inequality Operator Used to determine if two managed object pointers are not identical. This method does not dereference or evaluate the two pointers, only the memory addresses are compared.

Parameters:
rLHS The first smart pointer object to compare against.
rRHS The second smart pointer object to compare against.
Returns:
true if the managed object pointers are different, false otherwise.
Exceptions:
None 

Definition at line 595 of file CountedObject.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:35 2009 for Autodesk DWF Core Library by  doxygen 1.4.5