#include <freecloth/resmgt/rcShdPtr.h>
Inheritance diagram for RCShdPtr< T >:
Public Types | |
typedef T | element_type |
Public Member Functions | |
RCShdPtr (T *=0) | |
RCShdPtr (const RCShdPtr &rhs) | |
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 |
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.