Main Page   Class Hierarchy   Compound List   File List   Compound Members  

freecloth::RCShdPtr Class Template Reference

Reference-counted shared smart pointer. More...

#include <freecloth/resmgt/rcShdPtr.h>

Inheritance diagram for freecloth::RCShdPtr:

freecloth::RCShdPtrBase List of all members.

Public Types

typedef T element_type

Public Methods

 RCShdPtr (T *=0)
 RCShdPtr (const RCShdPtr &rhs)
 ~RCShdPtr ()
RCShdPtr & operator= (const RCShdPtr &rhs)
bool isNull () const
T & operator * () const
T * operator-> () const
T * get () const
bool operator== (const RCShdPtr &) const
bool operator!= (const RCShdPtr &) const
bool operator== (const RCBase *) const
bool operator!= (const RCBase *) const

Detailed Description

template<class T>
class freecloth::RCShdPtr< T >

Reference-counted shared smart pointer.

This is a general-purpose smart pointer class. It takes ownership of the input pointer on construction, and deletes the input pointer when its reference count drops to zero.

The reference count is incremented every time RCShdPtr's copy constructor is called. The count is decremented every time RCShdPtr's destructor is called. Copies of this object will point to the same data, hence "shared" smart pointer; this is not a copy-on-write pointer.

The template parameter must be derived from RCBase. At present, it should not be of const type.

Definition at line 97 of file rcShdPtr.h.


The documentation for this class was generated from the following files:
Generated on Fri May 2 13:04:27 2003 for Freecloth by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002