Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
FWCore
Utilities
interface
ObjectWithDict.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_ObjectWithDict_h
2
#define FWCore_Utilities_ObjectWithDict_h
3
4
/*----------------------------------------------------------------------
5
6
ObjectWithDict: A holder for an object and its type information.
7
8
----------------------------------------------------------------------*/
9
#include <string>
10
#include <typeinfo>
11
12
#include "
FWCore/Utilities/interface/TypeWithDict.h
"
13
14
namespace
edm {
15
16
class
ObjectWithDict
{
17
public
:
18
ObjectWithDict
();
19
20
ObjectWithDict
(
TypeWithDict
const
&
type
,
void
*
address
);
21
22
ObjectWithDict
(std::type_info
const
& typeID,
void
* address);
23
24
static
ObjectWithDict
byType
(
TypeWithDict
const
& type);
25
26
void
*
address
()
const
;
27
28
TypeWithDict
const
&
typeOf
()
const
;
29
30
TypeWithDict
dynamicType
()
const
;
31
32
ObjectWithDict
get
(
std::string
const
& memberName)
const
;
33
34
#ifndef __GCCXML__
35
explicit
operator
bool()
const
;
36
#endif
37
38
template
<
typename
T>
T
objectCast
() {
39
return
*
reinterpret_cast<
T
*
>
(
address_
);
40
}
41
42
private
:
43
friend
class
FunctionWithDict
;
44
friend
class
MemberWithDict
;
45
friend
class
TypeWithDict
;
46
47
TypeWithDict
type_
;
48
void
*
address_
;
49
};
50
51
}
52
#endif
edm::ObjectWithDict
Definition:
ObjectWithDict.h:16
edm::ObjectWithDict::byType
static ObjectWithDict byType(TypeWithDict const &type)
Definition:
ObjectWithDict.cc:12
type
type
Definition:
HCALResponse.h:21
edm::ObjectWithDict::address
void * address() const
Definition:
ObjectWithDict.cc:46
edm::ObjectWithDict::dynamicType
TypeWithDict dynamicType() const
Definition:
ObjectWithDict.cc:33
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
TypeWithDict.h
edm::ObjectWithDict::address_
void * address_
Definition:
ObjectWithDict.h:48
edm::ObjectWithDict::typeOf
TypeWithDict const & typeOf() const
Definition:
ObjectWithDict.cc:28
edm::MemberWithDict
Definition:
MemberWithDict.h:19
edm::ObjectWithDict::objectCast
T objectCast()
Definition:
ObjectWithDict.h:38
edm::ObjectWithDict::ObjectWithDict
ObjectWithDict()
Definition:
ObjectWithDict.cc:6
edm::TypeWithDict
Definition:
TypeWithDict.h:45
edm::FunctionWithDict
Definition:
FunctionWithDict.h:19
T
long double T
Definition:
Basic3DVectorLD.h:57
edm::ObjectWithDict::type_
TypeWithDict type_
Definition:
ObjectWithDict.h:47
Generated for CMSSW Reference Manual by
1.8.5