DWFCore::DWFCountedObjectPointer Class Reference

#include "dwfcore/CountedObject.h"

Inheritance diagram for DWFCore::DWFCountedObjectPointer:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFCountedObjectPointer:

Collaboration graph
[legend]
List of all members.

Detailed Description

Smart pointer class for reference counted objects.

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.

Definition at line 177 of file CountedObject.h.

Public Member Functions

_DWFCORE_API DWFCountedObjectPointer (DWFCountedObject *pObject) throw ()
virtual _DWFCORE_API ~DWFCountedObjectPointer () throw ()
_DWFCORE_API DWFCountedObjectPointer (const DWFCountedObjectPointer &rSrc) throw ()
_DWFCORE_API DWFCountedObjectPointeroperator= (const DWFCountedObjectPointer &rSrc) throw ()
_DWFCORE_API operator DWFCountedObject * () const throw ()
_DWFCORE_API operator const DWFCountedObject * () const throw ()
_DWFCORE_API operator void * () const throw ()
_DWFCORE_API operator const void * () const throw ()
_DWFCORE_API operator DWFCountedObject & () const throw ()
_DWFCORE_API operator const DWFCountedObject & () const throw ()
_DWFCORE_API bool isNull () const throw ()
_DWFCORE_API bool operator== (const DWFCountedObjectPointer &rRHS) const throw ()

Friends

_DWFCORE_API friend bool operator!= (const DWFCountedObjectPointer &rLHS, const DWFCountedObjectPointer &rRHS) throw ()


Constructor & Destructor Documentation

_DWFCORE_API DWFCore::DWFCountedObjectPointer::DWFCountedObjectPointer DWFCountedObject 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 194 of file CountedObject.h.

virtual _DWFCORE_API DWFCore::DWFCountedObjectPointer::~DWFCountedObjectPointer  )  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 212 of file CountedObject.h.

_DWFCORE_API DWFCore::DWFCountedObjectPointer::DWFCountedObjectPointer const DWFCountedObjectPointer 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 228 of file CountedObject.h.


Member Function Documentation

_DWFCORE_API bool DWFCore::DWFCountedObjectPointer::isNull  )  const throw () [inline]
 

Used to determine if the managed object is NULL. This method was called null() in version 1.0.1.

Returns:
true if the managed object pointer NULL, false otherwise.
Exceptions:
None 

Definition at line 359 of file CountedObject.h.

_DWFCORE_API DWFCore::DWFCountedObjectPointer::operator const DWFCountedObject &  )  const throw () [inline]
 

Constant Reference Cast Operator Used to cast a smart pointer object to a const reference to the managed DWFCountedObject pointer.

Returns:
The managed object reference.
Exceptions:
None 

Definition at line 344 of file CountedObject.h.

_DWFCORE_API DWFCore::DWFCountedObjectPointer::operator const DWFCountedObject *  )  const throw () [inline]
 

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

Returns:
The managed object pointer.
Exceptions:
None 

Definition at line 286 of file CountedObject.h.

_DWFCORE_API DWFCore::DWFCountedObjectPointer::operator const void *  )  const throw () [inline]
 

Constant Void Cast Operator Used to cast a smart pointer object to a void pointer to the managed DWFCountedObject pointer.

Returns:
A void pointer to the managed object pointer.
Exceptions:
None 

Definition at line 316 of file CountedObject.h.

_DWFCORE_API DWFCore::DWFCountedObjectPointer::operator DWFCountedObject &  )  const throw () [inline]
 

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

Returns:
The managed object reference.
Exceptions:
None 

Definition at line 330 of file CountedObject.h.

_DWFCORE_API DWFCore::DWFCountedObjectPointer::operator DWFCountedObject *  )  const throw () [inline]
 

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

Returns:
The managed object pointer.
Exceptions:
None 

Definition at line 272 of file CountedObject.h.

_DWFCORE_API DWFCore::DWFCountedObjectPointer::operator void *  )  const throw () [inline]
 

Void Cast Operator Used to cast a smart pointer object to a void pointer to the managed DWFCountedObject pointer.

Returns:
A void pointer to the managed object pointer.
Exceptions:
None 

Definition at line 301 of file CountedObject.h.

_DWFCORE_API DWFCountedObjectPointer& DWFCore::DWFCountedObjectPointer::operator= const DWFCountedObjectPointer 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 249 of file CountedObject.h.

_DWFCORE_API bool DWFCore::DWFCountedObjectPointer::operator== const DWFCountedObjectPointer 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 377 of file CountedObject.h.


Friends And Related Function Documentation

_DWFCORE_API friend bool operator!= const DWFCountedObjectPointer rLHS,
const DWFCountedObjectPointer 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 396 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