BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
dchain::ReferenceCount Class Reference

#include <ReferenceCount.h>

+ Inheritance diagram for dchain::ReferenceCount:

Public Member Functions

 ReferenceCount ()
 
virtual ~ReferenceCount ()
 
void addLink () const
 
void dropLink () const
 

Detailed Description

Definition at line 69 of file ReferenceCount.h.

Constructor & Destructor Documentation

◆ ReferenceCount()

dchain::ReferenceCount::ReferenceCount ( )
inline

Definition at line 98 of file ReferenceCount.h.

98 :
99 m_linkCount( 0 )
100{
101}

◆ ~ReferenceCount()

virtual dchain::ReferenceCount::~ReferenceCount ( )
inlinevirtual

Definition at line 74 of file ReferenceCount.h.

74{}

Member Function Documentation

◆ addLink()

void dchain::ReferenceCount::addLink ( ) const
inline

Definition at line 107 of file ReferenceCount.h.

108{
109 //if (m_linkCount==0xFFFFFFFF) {
110 // throw TooManyReferencesException();
111 //}
112 ++m_linkCount ;
113}

◆ dropLink()

void dchain::ReferenceCount::dropLink ( ) const
inline

Definition at line 115 of file ReferenceCount.h.

116{
117 --m_linkCount ;
118 if ( 0 == m_linkCount ) {
119// It is necessary to throw away the 'const' so that the object
120// can be deleted
121 delete const_cast<ReferenceCount*>(this) ;
122 }
123}

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