Loading [MathJax]/extensions/tex2jax.js
ROOT
6.08/07
Reference Guide
ROOT Home Page
Main Page
Tutorials
User's Classes
+
Namespaces
Namespace List
+
Namespace Members
+
All
2
3
<
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
<
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
2
3
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
u
v
x
+
Enumerations
a
d
e
f
g
h
m
p
t
v
w
y
+
Enumerator
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
u
v
w
+
All Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
y
+
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
w
y
+
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Properties
f
+
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Files
File List
+
File Members
+
All
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Enumerations
c
e
f
i
l
m
p
r
u
x
+
Enumerator
a
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
v
w
x
y
z
+
Macros
1
2
3
4
5
6
7
8
9
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Release Notes
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
core
base
inc
TRefCnt.h
Go to the documentation of this file.
1
// @(#)root/base:$Id$
2
// Author: Fons Rademakers 04/08/95
3
4
/*************************************************************************
5
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6
* All rights reserved. *
7
* *
8
* For the licensing terms see $ROOTSYS/LICENSE. *
9
* For the list of contributors see $ROOTSYS/README/CREDITS. *
10
*************************************************************************/
11
12
#ifndef ROOT_TRefCnt
13
#define ROOT_TRefCnt
14
15
16
//////////////////////////////////////////////////////////////////////////
17
// //
18
// TRefCnt //
19
// //
20
// Base class for reference counted objects. //
21
// //
22
//////////////////////////////////////////////////////////////////////////
23
24
#ifndef ROOT_Rtypes
25
#include "
Rtypes.h
"
26
#endif
27
28
29
class
TRefCnt
{
30
31
protected
:
32
UInt_t
fRefs
;
// (1 less than) number of references
33
34
public
:
35
enum
EReferenceFlag
{
kStaticInit
};
36
37
TRefCnt
(
Int_t
initRef = 0) : fRefs((
UInt_t
)initRef-1) { }
38
TRefCnt
(
EReferenceFlag
);
39
virtual
~TRefCnt
() { }
40
UInt_t
References
()
const
{
return
fRefs+1; }
41
void
SetRefCount
(
UInt_t
r
) { fRefs = r-1; }
42
void
AddReference
() { fRefs++; }
43
UInt_t
RemoveReference
() {
return
fRefs--; }
44
};
45
46
#endif
Rtypes.h
TRefCnt::fRefs
UInt_t fRefs
Definition:
TRefCnt.h:32
TRefCnt
Definitions for TRefCnt, base class for reference counted objects.
Definition:
TRefCnt.h:29
Int_t
int Int_t
Definition:
RtypesCore.h:41
TRefCnt::SetRefCount
void SetRefCount(UInt_t r)
Definition:
TRefCnt.h:41
r
TRandom2 r(17)
UInt_t
unsigned int UInt_t
Definition:
RtypesCore.h:42
TRefCnt::References
UInt_t References() const
Definition:
TRefCnt.h:40
TRefCnt::RemoveReference
UInt_t RemoveReference()
Definition:
TRefCnt.h:43
TRefCnt::EReferenceFlag
EReferenceFlag
Definition:
TRefCnt.h:35
TRefCnt::~TRefCnt
virtual ~TRefCnt()
Definition:
TRefCnt.h:39
TRefCnt::AddReference
void AddReference()
Definition:
TRefCnt.h:42
TRefCnt::TRefCnt
TRefCnt(Int_t initRef=0)
Definition:
TRefCnt.h:37
TRefCnt::kStaticInit
Definition:
TRefCnt.h:35