#include <sp_smartpointer.h>

Public Member Functions | |
| unsigned | refs () const |
| gives the reference count of the object | |
| void | addReference () |
| addReference increments the ref count and checks for refCount overflow | |
| void | removeReference () |
| removeReference delete the object when refCount is zero | |
Protected Member Functions | |
| sp_smartable () | |
| sp_smartable (const sp_smartable &) | |
| virtual | ~sp_smartable () |
| destructor checks for non-zero refCount | |
| sp_smartable & | operator= (const sp_smartable &) |
Any object that want to support smart pointers should inherit from the smartable class which provides reference counting and automatic delete when the reference count drops to zero.
| sp_smartable::sp_smartable | ( | ) | [inline, protected] |
| sp_smartable::sp_smartable | ( | const sp_smartable & | ) | [inline, protected] |
| virtual sp_smartable::~sp_smartable | ( | ) | [inline, protected, virtual] |
destructor checks for non-zero refCount
| void sp_smartable::addReference | ( | ) |
addReference increments the ref count and checks for refCount overflow
| sp_smartable& sp_smartable::operator= | ( | const sp_smartable & | ) | [inline, protected] |
| unsigned sp_smartable::refs | ( | ) | const [inline] |
gives the reference count of the object
| void sp_smartable::removeReference | ( | ) |
removeReference delete the object when refCount is zero
1.5.8