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

CP_AutoOSPtrTemp< T > Class Template Reference

A smart pointer like class for dealing with Ptrs. More...

List of all members.

Public Member Functions

Constructor / Destructor
 CP_AutoOSPtrTemp ()
 Constructor.
 CP_AutoOSPtrTemp (CP_AutoOSPtrTemp &inAutoPtr)
 CP_AutoOSPtrTemp (T *inPtr)
 ~CP_AutoOSPtrTemp () throw ()
 Destructor.
operators
CP_AutoOSPtrTempoperator= (CP_AutoOSPtrTemp &ioPtr) throw ()
 operator T () const throw ()
Getters
Get () const throw ()
Management
Release () throw ()
void Reset (T inPtr=NULL) throw ()

Protected Attributes

T * fPtr


Detailed Description

template<typename T>
class CP_AutoOSPtrTemp< T >

This class wraps an OSs Ptr object into a smart pointer that manages the allocation and deallocation automatically.


Constructor & Destructor Documentation

template<typename T>
CP_AutoOSPtrTemp< T >::CP_AutoOSPtrTemp  ) 
 

Constructor.

Exceptions:
NULL exceptions.

template<typename T>
CP_AutoOSPtrTemp< T >::CP_AutoOSPtrTemp CP_AutoOSPtrTemp< T > &  inAutoPtr  ) 
 

Copy onstructor.

Parameters:
inAutoPtr AutoPtr object to copy the contents from.
Exceptions:
none 

template<typename T>
CP_AutoOSPtrTemp< T >::CP_AutoOSPtrTemp T *  inPtr  )  [explicit]
 

Constructor.

Parameters:
inPtr T to acquire ownership of.
Exceptions:
none 

template<typename T>
CP_AutoOSPtrTemp< T >::~CP_AutoOSPtrTemp  )  throw ()
 

Destructor.

Exceptions:
none 


Member Function Documentation

template<typename T>
CP_AutoOSPtrTemp< T > & CP_AutoOSPtrTemp< T >::operator= CP_AutoOSPtrTemp< T > &  inAutoPtr  )  throw ()
 

Assignment operator. Copies the fields from the passed in AutoPtr to this object.

Parameters:
inAutoPtr AutoPtr object to copy fields from.
Exceptions:
none 
Returns:
CP_AutoOSPtrTemp& Returns a reference to ourselves.

template<typename T>
CP_AutoOSPtrTemp< T >::operator T  )  const throw ()
 

Returns the Ptr as an OSPtr.

Exceptions:
none 
Returns:
T The platforms OS Ptr.

template<typename T>
T CP_AutoOSPtrTemp< T >::Get  )  const throw ()
 

Returns the Ptr as an OSPtr.

Exceptions:
none 
Returns:
T The platforms OS Ptr.

template<typename T>
T CP_AutoOSPtrTemp< T >::Release  )  throw ()
 

Sets the T of this object to NULL, and returns the previous OS Ptr.

Exceptions:
none 
Returns:
T Returns the previous Ptr.

template<typename T>
void CP_AutoOSPtrTemp< T >::Reset inPtr = NULL  )  throw ()
 

Disposes of the T previously held in this objects, and then sets the Ptr to the passed in T.

Parameters:
inPtr The T to acquire ownership of.
Exceptions:
none 
Returns:
T Returns the previous Ptr.


Member Data Documentation

template<typename T>
T* CP_AutoOSPtrTemp< T >::fPtr [protected]
 


The documentation for this class was generated from the following files:
Generated on Sat Sep 17 20:01:22 2005 for CPLAT by  doxygen 1.4.0