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

CP_AutoOSPtr Class Reference

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

List of all members.

Public Member Functions

Constructor / Destructor
 CP_AutoOSPtr ()
 Constructor.
 CP_AutoOSPtr (CP_AutoOSPtr &inAutoPtr)
 CP_AutoOSPtr (OSPtr inPtr)
 CP_AutoOSPtr (size_t inSize)
 ~CP_AutoOSPtr () throw ()
 Destructor.
operators
CP_AutoOSPtroperator= (CP_AutoOSPtr &ioPtr) throw ()
 operator OSPtr () const throw ()
Getters
OSPtr Get () const throw ()
Management
OSPtr Release () throw ()
void Reset (OSPtr inPtr=NULL) throw ()

Protected Attributes

OSPtr fPtr


Detailed Description

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


Constructor & Destructor Documentation

CPLAT_Begin_Namespace_CPLAT CP_AutoOSPtr::CP_AutoOSPtr  ) 
 

Constructor.

Exceptions:
NULL exceptions

CP_AutoOSPtr::CP_AutoOSPtr CP_AutoOSPtr inAutoPtr  ) 
 

Copy onstructor.

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

CP_AutoOSPtr::CP_AutoOSPtr OSPtr  inPtr  )  [explicit]
 

Constructor.

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

CP_AutoOSPtr::CP_AutoOSPtr size_t  inSize  )  [explicit]
 

Constructor.

Parameters:
inSize Size to allocate for new Ptr.
Exceptions:
NULL exceptions

CP_AutoOSPtr::~CP_AutoOSPtr  )  throw ()
 

Destructor.

Exceptions:
none 


Member Function Documentation

CP_AutoOSPtr & CP_AutoOSPtr::operator= CP_AutoOSPtr 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_AutoOSPtr& Returns a reference to ourselves.

CP_AutoOSPtr::operator OSPtr  )  const throw ()
 

Returns the Ptr as an OSPtr.

Exceptions:
none 
Returns:
OSPtr The platforms OS Ptr.

OSPtr CP_AutoOSPtr::Get  )  const throw ()
 

Returns the Ptr as an OSPtr.

Exceptions:
none 
Returns:
OSPtr The platforms OS Ptr.

OSPtr CP_AutoOSPtr::Release  )  throw ()
 

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

Exceptions:
none 
Returns:
OSPtr Returns the previous Ptr.

void CP_AutoOSPtr::Reset OSPtr  inPtr = NULL  )  throw ()
 

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

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


Member Data Documentation

OSPtr CP_AutoOSPtr::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