#include <ParmParse.H>
Inheritance diagram for PP_LnPtr< T >:
Public Methods | |
PP_LnPtr () | |
: The default constructor. The wrapped pointer is null. | |
PP_LnPtr (T *rhs) | |
: Construct a PP_LnPtr<T> setting the wrapped pointer to rhs. | |
PP_LnPtr< T > & | operator= (const PP_LnPtr< T > &rhs) |
PP_LnPtr< T > & | operator= (T *rhs) |
~PP_LnPtr () | |
bool | unique () const |
: Returns true if only one reference to the wrapped pointer. | |
int | linkCount () const |
: Returns the number of references to the wrapped pointer. | |
T & | operator * () const |
bool | isNull () const |
: Returns true if the wrapped pointer is null. | |
bool | operator== (const PP_LnPtr< T > &rhs) const |
: Are the two pointers (not the values to which they point) equal? | |
bool | operator!= (const PP_LnPtr< T > &rhs) const |
: Are the two pointers not equal? | |
Protected Attributes | |
T * | ptr |
The template class PP_LnPtr<T> provides a reference counted wrapper around a pointer to type T (a T*). This "smart" pointer is intended for use with any type type T, including the intrinsic types. For this reason, we do not supply an operator->(), as such an operator on intrinsic types has only recently become a part of the C++ language and many compilers do not yet implement it.
This is a convenience class for ParmParse and will not be in any way supported by anyone at ANAG.
|
: The default constructor. The wrapped pointer is null.
|
|
: Construct a PP_LnPtr<T> setting the wrapped pointer to rhs.
|
|
: The destructor -- decrements the reference count and deletes the wrapped pointer if there is only one reference. |
|
: Returns true if the wrapped pointer is null.
|
|
: Returns the number of references to the wrapped pointer.
|
|
: Returns a reference to the value pointed to by the wrapped pointer; i.e. dereferencing this PP_LnPtr<T>, returns the dereferenced wrapped pointer. It is an error if the wrapped pointer is null. |
|
: Are the two pointers not equal?
|
|
: Sets the wrapped pointer to rhs. Decrements the count on the previously wrapped pointer and deletes it if there was only one reference. Reimplemented in PP_LnClassPtr< T >, and PP_LnClassPtr< PP_StringRep >. |
|
: 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. |
|
: Are the two pointers (not the values to which they point) equal?
|
|
: Returns true if only one reference to the wrapped pointer.
|
|
|