Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

PP_CpClassPtr< T > Class Template Reference

A Smart Pointer for User-Defined Types for ParmParse. More...

#include <ParmParse.H>

Inheritance diagram for PP_CpClassPtr< T >:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PP_CpClassPtr ()
 : The default constructor. The wrapped pointer is null.

 PP_CpClassPtr (T *rhs)
 : Construct a PP_CpPtr<T> setting the wrapped pointer to rhs.

 PP_CpClassPtr (const PP_CpClassPtr< T > &rhs)
PP_CpClassPtr< T > & operator= (T *rhs)
PP_CpClassPtr< T > & operator= (const PP_CpClassPtr< T > &rhs)
T * operator-> () const
 : Applies operator-> to the wrapped pointer.


Detailed Description

template<class T>
class PP_CpClassPtr< T >

A Smart Pointer for User-Defined Types for ParmParse.

The template class PP_CpClassPtr<T> is derived from PP_CpPtr<T>. It provides a simple wrapper around a pointer to type T (a T*) that "does the right thing" when copied from one PP_CpPtr<T> to another. The type T MUST be a user-defined type, not an intrinsic type. Given this restriction, we can supply an operator->().

This is a convenience class for ParmParse and will not be in any way supported by anyone at ANAG.


Constructor & Destructor Documentation

template<class T>
PP_CpClassPtr< T >::PP_CpClassPtr  )  [inline]
 

: The default constructor. The wrapped pointer is null.

template<class T>
PP_CpClassPtr< T >::PP_CpClassPtr T *  rhs  )  [inline]
 

: Construct a PP_CpPtr<T> setting the wrapped pointer to rhs.

template<class T>
PP_CpClassPtr< T >::PP_CpClassPtr const PP_CpClassPtr< T > &  rhs  )  [inline]
 

: The copy constructor. If the pointer wrapped by rhs is null, the wrapped pointer is null here as well. Otherwise, the contained pointer here is set to a new'd copy of that wrapped by rhs, with the two pointed-to values being identical. This assumes that type T has a well-defined and accessible copy constructor. T must also be a concrete type, not a abstract type.


Member Function Documentation

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

: Applies operator-> to the wrapped pointer.

template<class T>
PP_CpClassPtr< T > & PP_CpClassPtr< T >::operator= const PP_CpClassPtr< T > &  rhs  )  [inline]
 

: The copy assignment operator. If the pointer wrapped by rhs is null, the wrapped pointer is null here as well. Otherwise, the contained pointer here is set to a new'd copy of that wrapped by rhs, with the two pointed-to values being identical. This assumes that type T has a well-defined and accessible copy constructor. T must also be a concrete type, not a abstract type.

template<class T>
PP_CpClassPtr< T > & PP_CpClassPtr< T >::operator= T *  rhs  )  [inline]
 

: Sets the wrapped pointer to rhs. Deletes the previously wrapped pointer.

Reimplemented from PP_CpPtr< T >.


The documentation for this class was generated from the following file:
Generated on Wed Jun 2 13:59:00 2004 for Chombo&INSwithParticles by doxygen 1.3.2