Main Page
Namespaces
Namespace List
Namespace 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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
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
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
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
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
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
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
DataFormats
GeometryCommonDetAlgo
interface
DeepCopyPointerByClone.h
Go to the documentation of this file.
1
#ifndef DeepCopyPointerByClone_H
2
#define DeepCopyPointerByClone_H
3
4
#include <algorithm>
5
10
template
<
class
T>
11
class
DeepCopyPointerByClone
{
12
public
:
13
~DeepCopyPointerByClone
() {
delete
theData
; }
14
DeepCopyPointerByClone
() :
theData
(nullptr) {}
15
16
DeepCopyPointerByClone
(
T
*
t
) :
theData
(
t
) {}
17
18
DeepCopyPointerByClone
(
const
DeepCopyPointerByClone
&
other
) {
19
if
(
other
.theData)
20
theData
=
other
->clone();
21
else
22
theData
=
nullptr
;
23
}
24
25
DeepCopyPointerByClone
&
operator=
(
const
DeepCopyPointerByClone
&
other
) {
26
if
(
theData
!=
other
.theData) {
27
delete
theData
;
28
if
(
other
.theData)
29
theData
=
other
->clone();
30
else
31
theData
= 0;
32
}
33
return
*
this
;
34
}
35
36
// straight from http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2027.html
37
DeepCopyPointerByClone
(
DeepCopyPointerByClone
&&
other
) :
theData
(
other
.
theData
) {
other
.theData = 0; }
38
DeepCopyPointerByClone
&
operator=
(
DeepCopyPointerByClone
&&
other
) {
39
std::swap
(
theData
,
other
.theData);
40
return
*
this
;
41
}
42
43
T
&
operator*
() {
return
*
theData
; }
44
const
T
&
operator*
()
const
{
return
*
theData
; }
45
46
T
*
operator->
() {
return
theData
; }
47
const
T
*
operator->
()
const
{
return
theData
; }
48
50
operator
bool
()
const
{
return
theData
!= 0; }
51
53
bool
operator==
(
const
T
* otherP)
const
{
return
theData
== otherP; }
54
55
private
:
56
T
*
theData
;
57
};
58
59
#endif // DeepCopyPointerByClone_H
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
DeepCopyPointerByClone::operator*
const T & operator*() const
Definition:
DeepCopyPointerByClone.h:44
DeepCopyPointerByClone::operator==
bool operator==(const T *otherP) const
to allow test like " if (p == &someT) {...}"
Definition:
DeepCopyPointerByClone.h:53
DeepCopyPointerByClone
Definition:
DeepCopyPointerByClone.h:11
DeepCopyPointerByClone::operator->
const T * operator->() const
Definition:
DeepCopyPointerByClone.h:47
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition:
DataFrameContainer.h:209
DeepCopyPointerByClone::DeepCopyPointerByClone
DeepCopyPointerByClone(DeepCopyPointerByClone &&other)
Definition:
DeepCopyPointerByClone.h:37
DeepCopyPointerByClone::operator*
T & operator*()
Definition:
DeepCopyPointerByClone.h:43
trackingPlots.other
other
Definition:
trackingPlots.py:1460
DeepCopyPointerByClone::theData
T * theData
Definition:
DeepCopyPointerByClone.h:56
DeepCopyPointerByClone::~DeepCopyPointerByClone
~DeepCopyPointerByClone()
Definition:
DeepCopyPointerByClone.h:13
DeepCopyPointerByClone::DeepCopyPointerByClone
DeepCopyPointerByClone(T *t)
Definition:
DeepCopyPointerByClone.h:16
DeepCopyPointerByClone::DeepCopyPointerByClone
DeepCopyPointerByClone()
Definition:
DeepCopyPointerByClone.h:14
T
long double T
Definition:
Basic3DVectorLD.h:48
DeepCopyPointerByClone::DeepCopyPointerByClone
DeepCopyPointerByClone(const DeepCopyPointerByClone &other)
Definition:
DeepCopyPointerByClone.h:18
DeepCopyPointerByClone::operator=
DeepCopyPointerByClone & operator=(DeepCopyPointerByClone &&other)
Definition:
DeepCopyPointerByClone.h:38
DeepCopyPointerByClone::operator=
DeepCopyPointerByClone & operator=(const DeepCopyPointerByClone &other)
Definition:
DeepCopyPointerByClone.h:25
DeepCopyPointerByClone::operator->
T * operator->()
Definition:
DeepCopyPointerByClone.h:46
submitPVValidationJobs.t
string t
Definition:
submitPVValidationJobs.py:644
Generated for CMSSW Reference Manual by
1.8.16