FWCore
Reflection
interface
ObjectWithDict.h
Go to the documentation of this file.
1
#ifndef FWCore_Reflection_ObjectWithDict_h
2
#define FWCore_Reflection_ObjectWithDict_h
3
4
/*----------------------------------------------------------------------
5
6
ObjectWithDict: A holder for an object and its type information.
7
8
----------------------------------------------------------------------*/
9
10
#include <string>
11
#include <typeinfo>
12
13
#include "
FWCore/Reflection/interface/TypeWithDict.h
"
14
15
namespace
edm
{
16
17
class
ObjectWithDict
{
18
private
:
19
TypeWithDict
type_
;
20
void
*
address_
;
21
22
public
:
23
static
ObjectWithDict
byType
(
TypeWithDict
const
&);
24
25
public
:
26
ObjectWithDict
();
27
explicit
ObjectWithDict
(
TypeWithDict
const
&,
void
*
address
);
28
explicit
ObjectWithDict
(std::type_info
const
&,
void
*
address
);
29
explicit
operator
bool
()
const
;
30
void
*
address
()
const
;
31
TypeWithDict
typeOf
()
const
;
32
TypeWithDict
dynamicType
()
const
;
33
ObjectWithDict
castObject
(
TypeWithDict
const
&)
const
;
34
ObjectWithDict
get
(
std::string
const
& memberName)
const
;
35
//ObjectWithDict construct() const;
36
void
destruct
(
bool
dealloc)
const
;
37
template
<
typename
T>
38
T
objectCast
() {
39
return
*reinterpret_cast<T*>(
address_
);
40
}
41
};
42
43
}
// namespace edm
44
45
#endif // FWCore_Reflection_ObjectWithDict_h
electrons_cff.bool
bool
Definition:
electrons_cff.py:366
edm::ObjectWithDict::address
void * address() const
Definition:
ObjectWithDict.cc:27
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ObjectWithDict
Definition:
ObjectWithDict.h:17
edm::ObjectWithDict::castObject
ObjectWithDict castObject(TypeWithDict const &) const
Definition:
ObjectWithDict.cc:51
TypeWithDict.h
edm::ObjectWithDict::type_
TypeWithDict type_
Definition:
ObjectWithDict.h:19
edm::ObjectWithDict::ObjectWithDict
ObjectWithDict()
Definition:
ObjectWithDict.cc:18
edm::ObjectWithDict::address_
void * address_
Definition:
ObjectWithDict.h:20
edm::ObjectWithDict::destruct
void destruct(bool dealloc) const
Definition:
ObjectWithDict.cc:92
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::TypeWithDict
Definition:
TypeWithDict.h:38
edm::ObjectWithDict::typeOf
TypeWithDict typeOf() const
Definition:
ObjectWithDict.cc:29
edm::ObjectWithDict::objectCast
T objectCast()
Definition:
ObjectWithDict.h:38
edm::ObjectWithDict::dynamicType
TypeWithDict dynamicType() const
Definition:
ObjectWithDict.cc:38
edm::ObjectWithDict::byType
static ObjectWithDict byType(TypeWithDict const &)
Definition:
ObjectWithDict.cc:13
edm::ObjectWithDict::get
ObjectWithDict get(std::string const &memberName) const
Definition:
ObjectWithDict.cc:47
T
long double T
Definition:
Basic3DVectorLD.h:48
Generated for CMSSW Reference Manual by
1.8.16