c++-gtk-utils
|
This is a counter class providing the ref() and unref() functions required by IntrusivePtr. More...
#include <c++-gtk-utils/intrusive_ptr.h>
Public Member Functions | |
IntrusiveCounter (const IntrusiveCounter &) | |
IntrusiveCounter & | operator= (const IntrusiveCounter &) |
void | ref () |
void | unref () |
IntrusiveCounter () | |
virtual | ~IntrusiveCounter () |
This is a counter class providing the ref() and unref() functions required by IntrusivePtr.
This is a counter class providing the ref() and unref() functions required by IntrusivePtr. It is intended to be inherited from by classes which are to be managed by such a smart pointer.
Cgu::IntrusiveCounter::IntrusiveCounter | ( | const IntrusiveCounter & | ) |
This class cannot be copied. The copy constructor is deleted.
Cgu::IntrusiveCounter::IntrusiveCounter | ( | ) | [inline] |
virtual Cgu::IntrusiveCounter::~IntrusiveCounter | ( | ) | [inline, virtual] |
IntrusiveCounter& Cgu::IntrusiveCounter::operator= | ( | const IntrusiveCounter & | ) |
This class cannot be copied. The assignment operator is deleted.
void Cgu::IntrusiveCounter::ref | ( | ) | [inline] |
Increments the reference count. This method does not throw.
void Cgu::IntrusiveCounter::unref | ( | ) | [inline] |
Decrements the reference count, and if the count reaches 0 deletes itself (ie the managed object). This method does not throw unless the destructor of a derived class throws - that should never happen.