ROOT logo
ROOT » CORE » BASE » TRefCnt

class TRefCnt


TRefCnt

Base class for reference counted objects.


Function Members (Methods)

public:
TRefCnt(Int_t initRef = 0)
TRefCnt(TRefCnt::EReferenceFlag)
TRefCnt(const TRefCnt&)
virtual~TRefCnt()
voidAddReference()
TRefCnt&operator=(const TRefCnt&)
UInt_tReferences() const
UInt_tRemoveReference()
voidSetRefCount(UInt_t r)

Data Members

public:
enum EReferenceFlag { kStaticInit
};
protected:
UInt_tfRefs(1 less than) number of references

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TRefCnt(Int_t initRef = 0)
{ }
TRefCnt(EReferenceFlag)
virtual ~TRefCnt()
{ }
UInt_t References() const
{ return fRefs+1; }
void SetRefCount(UInt_t r)
{ fRefs = r-1; }
void AddReference()
{ fRefs++; }
UInt_t RemoveReference()
{ return fRefs--; }