DWFCore::DWFPointer< T > Class Template Reference

#include "dwfcore/Pointer.h"

Inheritance diagram for DWFCore::DWFPointer< T >:

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

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class DWFCore::DWFPointer< T >

Auto-pointer template.

Since:
1.0.1
This pointer template automatically deletes the object or memory block associated with it.

Parameters:
T The object or memory allocation type.

Definition at line 49 of file Pointer.h.

Public Member Functions

 DWFPointer (T *pT, bool bArray)
virtual ~DWFPointer ()
DWFPointeroperator= (T *pT) throw ()
 operator T * () const throw ()
 operator const T * () const throw ()
 operator void * () const throw ()
 operator const void * () const throw ()
 operator T & () const
 operator const T & () const
bool isNull () const throw ()
T * operator-> () const


Constructor & Destructor Documentation

template<class T>
DWFCore::DWFPointer< T >::DWFPointer T *  pT,
bool  bArray
[inline]
 

Constructor

Attention should be paid to the bArray parameter that controls the deallocator. Use the following as an example:

                DWFPointer<DWFString> apString( DWFCORE_ALLOC_OBJECT(DWFString), false );
       
                DWFPointer<int> apValues( DWFCORE_ALLOC_MEMORY(int, 16), true );

Parameters:
pT A pointer to the object or memory to scope.
bArray true if pT points to a memory block the DWFCORE_FREE_MEMORY macro will be used to release it, the DWFCORE_FREE_OBJECT macro will be used otherwise.
Exceptions:
None 

Definition at line 71 of file Pointer.h.

template<class T>
virtual DWFCore::DWFPointer< T >::~DWFPointer  )  [inline, virtual]
 

Destructor

Exceptions:
None 

Definition at line 81 of file Pointer.h.


Member Function Documentation

template<class T>
bool DWFCore::DWFPointer< T >::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 scoped pointer NULL, false otherwise.
Exceptions:
None 

Definition at line 188 of file Pointer.h.

template<class T>
DWFCore::DWFPointer< T >::operator const T &  )  const [inline]
 

Constant Reference Cast Operator

Returns:
The scoped reference.
Exceptions:
None 

Definition at line 175 of file Pointer.h.

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

Constant Cast Operator

Returns:
The scoped pointer.
Exceptions:
None 

Definition at line 128 of file Pointer.h.

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

Constant Void Cast Operator

Returns:
A void pointer to the scoped pointer.
Exceptions:
None 

Definition at line 152 of file Pointer.h.

template<class T>
DWFCore::DWFPointer< T >::operator T &  )  const [inline]
 

Reference Cast Operator

Returns:
The scoped reference.
Exceptions:
None 

Definition at line 164 of file Pointer.h.

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

Cast Operator

Returns:
The scoped pointer.
Exceptions:
None 

Definition at line 116 of file Pointer.h.

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

Void Cast Operator

Returns:
A void pointer to the scoped pointer.
Exceptions:
None 

Definition at line 140 of file Pointer.h.

template<class T>
T* DWFCore::DWFPointer< T >::operator->  )  const [inline]
 

Member Operator

Returns:
The scoped pointer.
Exceptions:
None 

Definition at line 200 of file Pointer.h.

template<class T>
DWFPointer& DWFCore::DWFPointer< T >::operator= T *  pT  )  throw () [inline]
 

Assignment Operator

Parameters:
pT A pointer to scope.
Exceptions:
None 

Definition at line 103 of file Pointer.h.


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