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

PP_LnClassPtr< T > Class Template Reference

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

#include <ParmParse.H>

Inheritance diagram for PP_LnClassPtr< T >:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PP_LnClassPtr ()
 : The default constructor. The wrapped pointer is null.
 PP_LnClassPtr (T *rhs)
 : Construct a PP_LnPtr<T> setting the wrapped pointer to rhs.
PP_LnClassPtr< T > & operator= (const PP_LnClassPtr< T > &rhs)
PP_LnClassPtr< T > & operator= (T *rhs)
T * operator-> () const
 : Applies operator-> to the wrapped pointer.

Detailed Description

template<class T>
class PP_LnClassPtr< T >

A Smart Reference Counted Pointer for User-Defined Types for ParmParse.

The template class PP_LnClassPtr<T> is derived from PP_LnPtr<T>. It provides a reference counted wrapper around a pointer to type T (a T*). 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_LnClassPtr< T >::PP_LnClassPtr  )  [inline]
 

: The default constructor. The wrapped pointer is null.

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

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


Member Function Documentation

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

: Applies operator-> to the wrapped pointer.

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

: Sets the wrapped pointer to rhs. Decrements the count on the previously wrapped pointer and deletes it if there was only one reference.

Reimplemented from PP_LnPtr< T >.

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

: The copy assignment operator. The contained pointer is set to the one wrapped by rhs. The reference count is decremented on this object and the reference count is incremented for the newly wrapped pointer.


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 14:02:03 2005 for Chombo&AMRSelfGravity by  doxygen 1.4.1