Main Page
Namespaces
Classes
Package Documentation
FWCore
Utilities
src
MemberWithDict.cc
Go to the documentation of this file.
1
#include "
FWCore/Utilities/interface/MemberWithDict.h
"
2
3
#include "
FWCore/Utilities/interface/ObjectWithDict.h
"
4
#include "
FWCore/Utilities/interface/TypeWithDict.h
"
5
#include <ostream>
6
#include <sstream>
7
8
namespace
edm
{
9
10
MemberWithDict::MemberWithDict
() : dataMember_(
nullptr
) {
11
}
12
13
MemberWithDict::MemberWithDict
(TDataMember* dataMember) :
dataMember_
(dataMember) {
14
}
15
16
MemberWithDict::operator
bool
()
const
{
17
return
dataMember_
!=
nullptr
;
18
}
19
20
std::string
21
MemberWithDict::name
()
const
{
22
return
dataMember_
->GetName();
23
}
24
25
TypeWithDict
26
MemberWithDict::typeOf
()
const
{
27
if
(
isArray
()) {
28
std::ostringstream
name
;
29
name <<
dataMember_
->GetTrueTypeName();
30
for
(
int
i
= 0;
i
<
dataMember_
->GetArrayDim(); ++
i
) {
31
name <<
'['
;
32
name <<
dataMember_
->GetMaxIndex(
i
);
33
name <<
']'
;
34
}
35
return
TypeWithDict::byName
(name.str());
36
}
37
return
TypeWithDict::byName
(
dataMember_
->GetTrueTypeName());
38
}
39
40
TypeWithDict
41
MemberWithDict::declaringType
()
const
{
42
return
TypeWithDict
(
dataMember_
->GetClass());
43
}
44
45
bool
46
MemberWithDict::isArray
()
const
{
47
return
dataMember_
->Property() & kIsArray;
48
}
49
50
bool
51
MemberWithDict::isConst
()
const
{
52
return
dataMember_
->Property() & kIsConstant;
53
}
54
55
bool
56
MemberWithDict::isPublic
()
const
{
57
return
dataMember_
->Property() & kIsPublic;
58
}
59
60
bool
61
MemberWithDict::isStatic
()
const
{
62
return
dataMember_
->Property() &
kIsStatic
;
63
}
64
65
bool
66
MemberWithDict::isTransient
()
const
{
67
return
!
dataMember_
->IsPersistent();
68
}
69
70
size_t
71
MemberWithDict::offset
()
const
{
72
return
dataMember_
->GetOffset();
73
}
74
75
ObjectWithDict
76
MemberWithDict::get
()
const
{
77
return
ObjectWithDict
(
typeOf
(), reinterpret_cast<void*>(
dataMember_
->GetOffset()));
78
}
79
80
ObjectWithDict
81
MemberWithDict::get
(
ObjectWithDict
const
&
obj
)
const
{
82
return
ObjectWithDict
(
typeOf
(), reinterpret_cast<char*>(obj.
address
()) +
dataMember_
->GetOffset());
83
}
84
85
}
// namespace edm
edm::ObjectWithDict
Definition:
ObjectWithDict.h:17
reco::parser::kIsStatic
Definition:
ErrorCodes.h:34
mps_fire.i
i
Definition:
mps_fire.py:269
edm::ObjectWithDict::address
void * address() const
Definition:
ObjectWithDict.cc:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
edm::MemberWithDict::isStatic
bool isStatic() const
Definition:
MemberWithDict.cc:61
edm::MemberWithDict::offset
size_t offset() const
Definition:
MemberWithDict.cc:71
edm::MemberWithDict::isArray
bool isArray() const
Definition:
MemberWithDict.cc:46
edm::MemberWithDict::MemberWithDict
MemberWithDict()
Definition:
MemberWithDict.cc:10
nullptr
#define nullptr
edm::TypeWithDict::byName
static TypeWithDict byName(std::string const &name)
Definition:
TypeWithDict.cc:82
edm::MemberWithDict::isPublic
bool isPublic() const
Definition:
MemberWithDict.cc:56
edm::MemberWithDict::declaringType
TypeWithDict declaringType() const
Definition:
MemberWithDict.cc:41
TypeWithDict.h
Utilities.operator
operator
Definition:
Utilities.py:24
ObjectWithDict.h
edm::MemberWithDict::dataMember_
TDataMember * dataMember_
Definition:
MemberWithDict.h:22
edm::MemberWithDict::name
std::string name() const
Definition:
MemberWithDict.cc:21
edm::MemberWithDict::get
ObjectWithDict get() const
Definition:
MemberWithDict.cc:76
edm::MemberWithDict::typeOf
TypeWithDict typeOf() const
Definition:
MemberWithDict.cc:26
edm::MemberWithDict::isConst
bool isConst() const
Definition:
MemberWithDict.cc:51
electrons_cff.bool
bool
Definition:
electrons_cff.py:317
GetRecoTauVFromDQM_MC_cff.obj
obj
Definition:
GetRecoTauVFromDQM_MC_cff.py:87
MemberWithDict.h
edm::MemberWithDict::isTransient
bool isTransient() const
Definition:
MemberWithDict.cc:66
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::TypeWithDict
Definition:
TypeWithDict.h:38
Generated for CMSSW Reference Manual by
1.8.11