atomic_sp_smartable Class Reference

the base class for smart pointers implementation with atomic acces to counter More...

#include <sp_smartpointer.h>

List of all members.

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

 atomic_sp_smartable ()
 atomic_sp_smartable (const atomic_sp_smartable &)
virtual ~atomic_sp_smartable ()
 destructor checks for non-zero refCount
atomic_sp_smartableoperator= (const atomic_sp_smartable &)


Detailed Description

the base class for smart pointers implementation with atomic acces to counter

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.


Constructor & Destructor Documentation

atomic_sp_smartable::atomic_sp_smartable (  )  [inline, protected]

atomic_sp_smartable::atomic_sp_smartable ( const atomic_sp_smartable  )  [inline, protected]

virtual atomic_sp_smartable::~atomic_sp_smartable (  )  [inline, protected, virtual]

destructor checks for non-zero refCount


Member Function Documentation

void atomic_sp_smartable::addReference (  ) 

addReference increments the ref count and checks for refCount overflow

atomic_sp_smartable& atomic_sp_smartable::operator= ( const atomic_sp_smartable  )  [inline, protected]

unsigned atomic_sp_smartable::refs (  )  const [inline]

gives the reference count of the object

void atomic_sp_smartable::removeReference (  ) 

removeReference delete the object when refCount is zero


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

Generated on Wed Jan 28 19:15:42 2009 for VEMUS by  doxygen 1.5.8