#include <ReferenceCount.h>
Inheritance diagram for dchain::ReferenceCount:
Public Member Functions | |
ReferenceCount () | |
virtual | ~ReferenceCount () |
void | addLink () const |
void | dropLink () const |
Private Member Functions | |
ReferenceCount (const ReferenceCount &) | |
const ReferenceCount & | operator= (const ReferenceCount &) |
Private Attributes | |
uint32_t | m_linkCount |
Definition at line 69 of file ReferenceCount.h.
dchain::ReferenceCount::ReferenceCount | ( | ) | [inline] |
virtual dchain::ReferenceCount::~ReferenceCount | ( | ) | [inline, virtual] |
dchain::ReferenceCount::ReferenceCount | ( | const ReferenceCount & | ) | [private] |
void dchain::ReferenceCount::addLink | ( | ) | const [inline] |
Definition at line 107 of file ReferenceCount.h.
References m_linkCount.
00108 { 00109 //if (m_linkCount==0xFFFFFFFF) { 00110 // throw TooManyReferencesException(); 00111 //} 00112 ++m_linkCount ; 00113 }
void dchain::ReferenceCount::dropLink | ( | ) | const [inline] |
Definition at line 115 of file ReferenceCount.h.
References m_linkCount.
00116 { 00117 --m_linkCount ; 00118 if ( 0 == m_linkCount ) { 00119 // It is necessary to throw away the 'const' so that the object 00120 // can be deleted 00121 delete const_cast<ReferenceCount*>(this) ; 00122 } 00123 }
const ReferenceCount& dchain::ReferenceCount::operator= | ( | const ReferenceCount & | ) | [private] |
uint32_t dchain::ReferenceCount::m_linkCount [mutable, private] |