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
MemberWithDict::MemberWithDict
(TDataMember* dataMember) :
dataMember_
(dataMember) {}
13
14
MemberWithDict::operator
bool
()
const
{
return
dataMember_
!=
nullptr
; }
15
16
std::string
MemberWithDict::name
()
const
{
return
dataMember_
->GetName(); }
17
18
TypeWithDict
MemberWithDict::typeOf
()
const
{
19
if
(
isArray
()) {
20
std::ostringstream
name
;
21
name <<
dataMember_
->GetTrueTypeName();
22
for
(
int
i
= 0;
i
<
dataMember_
->GetArrayDim(); ++
i
) {
23
name <<
'['
;
24
name <<
dataMember_
->GetMaxIndex(
i
);
25
name <<
']'
;
26
}
27
return
TypeWithDict::byName
(name.str());
28
}
29
return
TypeWithDict::byName
(
dataMember_
->GetTrueTypeName());
30
}
31
32
TypeWithDict
MemberWithDict::declaringType
()
const
{
return
TypeWithDict
(
dataMember_
->GetClass()); }
33
34
bool
MemberWithDict::isArray
()
const
{
return
dataMember_
->Property() & kIsArray; }
35
36
bool
MemberWithDict::isConst
()
const
{
return
dataMember_
->Property() & kIsConstant; }
37
38
bool
MemberWithDict::isPublic
()
const
{
return
dataMember_
->Property() & kIsPublic; }
39
40
bool
MemberWithDict::isStatic
()
const
{
return
dataMember_
->Property() &
kIsStatic
; }
41
42
bool
MemberWithDict::isTransient
()
const
{
return
!
dataMember_
->IsPersistent(); }
43
44
size_t
MemberWithDict::offset
()
const
{
return
dataMember_
->GetOffset(); }
45
46
ObjectWithDict
MemberWithDict::get
()
const
{
47
return
ObjectWithDict
(
typeOf
(), reinterpret_cast<void*>(
dataMember_
->GetOffset()));
48
}
49
50
ObjectWithDict
MemberWithDict::get
(
ObjectWithDict
const
&
obj
)
const
{
51
return
ObjectWithDict
(
typeOf
(), reinterpret_cast<char*>(obj.
address
()) +
dataMember_
->GetOffset());
52
}
53
54
}
// namespace edm
edm::ObjectWithDict
Definition:
ObjectWithDict.h:17
reco::parser::kIsStatic
Definition:
ErrorCodes.h:34
mps_fire.i
i
Definition:
mps_fire.py:338
edm::ObjectWithDict::address
void * address() const
Definition:
ObjectWithDict.cc:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::MemberWithDict::isStatic
bool isStatic() const
Definition:
MemberWithDict.cc:40
edm::MemberWithDict::offset
size_t offset() const
Definition:
MemberWithDict.cc:44
nullptr
#define nullptr
Definition:
GCC11Compatibility.h:37
edm::MemberWithDict::isArray
bool isArray() const
Definition:
MemberWithDict.cc:34
edm::MemberWithDict::MemberWithDict
MemberWithDict()
Definition:
MemberWithDict.cc:10
edm::TypeWithDict::byName
static TypeWithDict byName(std::string const &name)
Definition:
TypeWithDict.cc:74
edm::MemberWithDict::isPublic
bool isPublic() const
Definition:
MemberWithDict.cc:38
edm::MemberWithDict::declaringType
TypeWithDict declaringType() const
Definition:
MemberWithDict.cc:32
TypeWithDict.h
Utilities.operator
operator
Definition:
Utilities.py:24
ObjectWithDict.h
edm::MemberWithDict::dataMember_
TDataMember * dataMember_
Definition:
MemberWithDict.h:21
edm::MemberWithDict::name
std::string name() const
Definition:
MemberWithDict.cc:16
edm::MemberWithDict::get
ObjectWithDict get() const
Definition:
MemberWithDict.cc:46
edm::MemberWithDict::typeOf
TypeWithDict typeOf() const
Definition:
MemberWithDict.cc:18
hgcalPlots.obj
obj
Definition:
hgcalPlots.py:44
edm::MemberWithDict::isConst
bool isConst() const
Definition:
MemberWithDict.cc:36
electrons_cff.bool
bool
Definition:
electrons_cff.py:389
MemberWithDict.h
edm::MemberWithDict::isTransient
bool isTransient() const
Definition:
MemberWithDict.cc:42
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::TypeWithDict
Definition:
TypeWithDict.h:38
Generated for CMSSW Reference Manual by
1.8.11