ThePEG::Pointer::ConstRCPtr< T > Class Template Reference

ConstRCPtr is a reference counted (smart) const pointer. More...

#include <RCPtr.h>

Inheritance diagram for ThePEG::Pointer::ConstRCPtr< T >:

ThePEG::Pointer::RCPtrBase

List of all members.

Public Types

typedef void iterator_category
 Template argument typedef.
typedef void difference_type
 Template argument typedef.
typedef T * pointer
 Template argument typedef.
typedef const T * const_pointer
 Template argument typedef.
typedef T & reference
 Template argument typedef.
typedef const T & const_reference
 Template argument typedef.
typedef T value_type
 Template argument typedef.

Public Member Functions

 ConstRCPtr ()
 Constructor for null pointer.
 ConstRCPtr (const ConstRCPtr &p)
 Copy constructor.
template<typename UPtr>
 ConstRCPtr (const UPtr &u)
 Copyconstructor for class UPtr which has operator-> defined resulting in a value implicitly convertible to const T *.
 ConstRCPtr (const_pointer p)
 Construction from real pointer.
 ~ConstRCPtr ()
 Destructor.
ConstRCPtroperator= (const ConstRCPtr &p)
 Assignment.
template<typename UPtr>
ConstRCPtroperator= (const UPtr &u)
 Assignment from class UPtr which has operator-> defined resulting in a value implicitly convertible to const T *.
template<typename UPtr>
ConstRCPtrassignDynamic (const UPtr &u)
 Assignment from class UPtr which has operator-> defined resulting in a value which can be cast dynamically to const T *.
void swap (ConstRCPtr &p)
 Make p point to the object pointed to by this and vice versa.
bool operator== (const ConstRCPtr &p) const
 Test for equality of the underlying pointers.
bool operator!= (const ConstRCPtr &p) const
 Test for inequality of the underlying pointers.
bool operator== (const_pointer p) const
 Test for equality of the underlying pointers.
bool operator!= (const_pointer p) const
 Test for inequality of the underlying pointers.
template<typename UPtr>
bool operator== (const UPtr &u) const
 Test for equality of the underlying pointers.
template<typename UPtr>
bool operator!= (const UPtr &u) const
 Test for inequality of the underlying pointers.
bool operator< (const ConstRCPtr &p) const
 Test for ordering.
bool operator< (const_pointer p) const
 Test for ordering.
bool operator! () const
 Returns true if the underlying pointer is null.
 operator const T * () const
 Returns the underlying pointer.
const_pointer operator-> () const
 Member access.
const_reference operator* () const
 Dereferencing.

Private Member Functions

void increment ()
 Increment the counter of the object pointed to.
void release ()
 Stop pointing to the current object and delete it if this was the last pointer to it.

Private Attributes

const_pointer ptr
 The actual pointer.


Detailed Description

template<typename T>
class ThePEG::Pointer::ConstRCPtr< T >

ConstRCPtr is a reference counted (smart) const pointer.

Objects created using the RCPtr::create() methods will continue living until no RCPtr or ConstRCPtr are pointing to it, at which point it will be deleted.

See also:
ReferenceCounted

Definition at line 315 of file RCPtr.h.


Member Typedef Documentation

template<typename T>
typedef void ThePEG::Pointer::ConstRCPtr< T >::iterator_category

Template argument typedef.

Definition at line 320 of file RCPtr.h.

template<typename T>
typedef void ThePEG::Pointer::ConstRCPtr< T >::difference_type

Template argument typedef.

Definition at line 322 of file RCPtr.h.

template<typename T>
typedef T* ThePEG::Pointer::ConstRCPtr< T >::pointer

Template argument typedef.

Definition at line 324 of file RCPtr.h.

template<typename T>
typedef const T* ThePEG::Pointer::ConstRCPtr< T >::const_pointer

Template argument typedef.

Definition at line 326 of file RCPtr.h.

template<typename T>
typedef T& ThePEG::Pointer::ConstRCPtr< T >::reference

Template argument typedef.

Definition at line 328 of file RCPtr.h.

template<typename T>
typedef const T& ThePEG::Pointer::ConstRCPtr< T >::const_reference

Template argument typedef.

Definition at line 330 of file RCPtr.h.

template<typename T>
typedef T ThePEG::Pointer::ConstRCPtr< T >::value_type

Template argument typedef.

Definition at line 332 of file RCPtr.h.


Constructor & Destructor Documentation

template<typename T>
ThePEG::Pointer::ConstRCPtr< T >::~ConstRCPtr (  )  [inline]

Destructor.

Deletes the object pointed to if this is the last pointer to it.

Definition at line 362 of file RCPtr.h.

References ThePEG::Pointer::ConstRCPtr< T >::release().


The documentation for this class was generated from the following file:

Generated on Thu Apr 29 12:43:34 2010 for ThePEG by  doxygen 1.5.5