#include <reference-count.h>
Inherited by BorgIv::ExpData, and DataReferenceCount.
Public Member Functions | |
ReferenceCount () | |
ReferenceCount (const ReferenceCount &) | |
ReferenceCount & | operator= (const ReferenceCount &o) |
void | incref () |
int | decref () |
virtual | ~ReferenceCount () |
Public Attributes | |
volatile int | reference_count |
Keeps track of the number of reference floating around to this object. This class is resistent to concurrent access. In other words the reference_count will be atomically increased and decreased
Definition at line 19 of file reference-count.h.
ReferenceCount::ReferenceCount | ( | ) | [inline] |
Definition at line 27 of file reference-count.h.
ReferenceCount::ReferenceCount | ( | const ReferenceCount & | ) | [inline] |
Definition at line 30 of file reference-count.h.
virtual ReferenceCount::~ReferenceCount | ( | ) | [inline, virtual] |
destroys the object. In this case performs a sanity check on the refernce_count.
Definition at line 78 of file reference-count.h.
int ReferenceCount::decref | ( | ) | [inline] |
decreases the refernce count. Returns the new reference count.
Definition at line 60 of file reference-count.h.
void ReferenceCount::incref | ( | ) | [inline] |
atomically increases the reference count.
Definition at line 42 of file reference-count.h.
ReferenceCount& ReferenceCount::operator= | ( | const ReferenceCount & | o | ) | [inline] |
Definition at line 33 of file reference-count.h.
volatile int ReferenceCount::reference_count |
The number of smart pointers refering to this object. 0 if none.
Definition at line 26 of file reference-count.h.