Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

DWFCore::DWFPointer< T > Class Template Reference

#include "dwfcore/Pointer.h"

Inheritance diagram for DWFCore::DWFPointer< T >:

Inheritance 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 null () 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 >::null  )  const throw () [inline]
 

Used to determine if the managed object is NULL.

Returns:
true if the scoped pointer is NULL, false otherwise.
Exceptions:
None 

Definition at line 187 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 199 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 May 17 12:05:19 2005 for Autodesk DWF Core Library by  doxygen 1.4.1