ThePEG 2.3.0
|
ReferenceCounted must be the (virtual) base class of all classes which may be pointed to by the RCPtr smart pointer class. More...
#include <ReferenceCounted.h>
Public Types | |
typedef unsigned int | CounterType |
The integer type used for counting. | |
Friends | |
class | RCPtrBase |
The RCPtrBase class needs to acces the private parts of ReferenceCounted. | |
class | ThePEG::PersistentIStream |
Standard constructors and assignment. | |
const unsigned long | uniqueId |
The unique ID. | |
static unsigned long | objectCounter |
A counter for issuing unique IDs. | |
CounterType | theReferenceCounter |
The reference count. | |
ReferenceCounted () | |
Default constructor. | |
ReferenceCounted (const ReferenceCounted &) | |
Copy-constructor. | |
ReferenceCounted & | operator= (const ReferenceCounted &) |
Assignment. | |
CounterType | referenceCount () const |
Return the reference count. | |
void | incrementReferenceCount () const |
Increment the reference count. | |
bool | decrementReferenceCount () const |
Decrement with the reference count. | |
ReferenceCounted must be the (virtual) base class of all classes which may be pointed to by the RCPtr smart pointer class.
It keeps track of all RCPtr and ConstRCPtr pointers which are currently pointing to an object.
Definition at line 30 of file ReferenceCounted.h.
typedef unsigned int ThePEG::Pointer::ReferenceCounted::CounterType |
The integer type used for counting.
Definition at line 41 of file ReferenceCounted.h.
|
inlineprotected |
Default constructor.
Definition at line 50 of file ReferenceCounted.h.
|
inlineprotected |
Copy-constructor.
Definition at line 57 of file ReferenceCounted.h.
|
inlineprivate |
Decrement with the reference count.
Definition at line 94 of file ReferenceCounted.h.
References theReferenceCounter.
Referenced by ThePEG::Pointer::RCPtrBase::release().
|
inlineprivate |
Increment the reference count.
Definition at line 86 of file ReferenceCounted.h.
References theReferenceCounter.
Referenced by ThePEG::Pointer::RCPtrBase::increment().
|
inlineprotected |
Assignment.
Definition at line 64 of file ReferenceCounted.h.
|
inline |
Return the reference count.
Definition at line 76 of file ReferenceCounted.h.
References theReferenceCounter.
|
friend |
The RCPtrBase class needs to acces the private parts of ReferenceCounted.
Definition at line 33 of file ReferenceCounted.h.
|
friend |
Definition at line 34 of file ReferenceCounted.h.
|
staticprivate |
A counter for issuing unique IDs.
It will overflow back to 0 eventually, but it is very unlikely that two identical IDs show up in the same event.
Definition at line 112 of file ReferenceCounted.h.
|
mutableprivate |
The reference count.
Definition at line 117 of file ReferenceCounted.h.
Referenced by decrementReferenceCount(), incrementReferenceCount(), and referenceCount().
const unsigned long ThePEG::Pointer::ReferenceCounted::uniqueId |
The unique ID.
Can be used as sorting criterion, e.g. for set<> and map<>.
Definition at line 104 of file ReferenceCounted.h.