template<class T> class PP_LnClassPtr : public PP_LnPtr<T>

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

Inheritance:

PP_LnClassPtr


public members:

PP_LnClassPtr ()
PP_LnClassPtr (T* rhs)
PP_LnClassPtr<T>& operator= (const PP_LnClassPtr<T>& rhs)
PP_LnClassPtr<T>& operator= (T* rhs)
T* operator->() const

Documentation

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.

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)
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.

PP_LnClassPtr<T>& operator= (T* rhs)
Sets the wrapped pointer to rhs. Decrements the count on the previously wrapped pointer and deletes it if there was only one reference.

T* operator-> () const
Applies operator-> to the wrapped pointer.


this class has no child classes.

alphabetic index hierarchy of classes


Chombo

Copyright Notice

This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.

It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.

This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.