ReferenceCount Class Reference

counts the number of smartpointers refering to it More...

#include <reference-count.h>

Inherited by BorgIv::ExpData, and DataReferenceCount.

List of all members.

Public Member Functions

 ReferenceCount ()
 ReferenceCount (const ReferenceCount &)
ReferenceCountoperator= (const ReferenceCount &o)
void incref ()
int decref ()
virtual ~ReferenceCount ()

Public Attributes

volatile int reference_count

Detailed Description

counts the number of smartpointers refering to it

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Member Data Documentation

The number of smart pointers refering to this object. 0 if none.

Definition at line 26 of file reference-count.h.

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

Generated on Sat Feb 20 19:04:27 2010 for Data Objects by  doxygen 1.5.9