Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CondCore
ORA
src
AnyData.h
Go to the documentation of this file.
1
#ifndef CondCore_ORA_AnyData_H
2
#define CondCore_ORA_AnyData_H
3
#include<string>
4
5
namespace
ora {
6
union
AnyData
{
7
8
// size is 8 byte no matter which architecture
9
char
v
[8];
10
bool
b
;
11
char
c
;
12
unsigned
char
uc
;
13
short
s
;
14
unsigned
short
us
;
15
int
i
;
16
unsigned
int
ui
;
17
long
long
l
;
18
unsigned
long
long
ul
;
19
float
f
;
20
double
d
;
21
void
*
p
;
22
char
*
ss
;
23
// std::string ss;
24
void
*
address
() {
return
v
;}
25
void
const
*
address
()
const
{
return
v
;}
26
27
// for generic type T better be the pointer to it...
28
template
<
typename
T>
29
inline
T
&
data
() {
return
*
reinterpret_cast<
T
*
>
(
address
());}
30
31
template
<
typename
T>
32
inline
T
data
()
const
{
return
*
reinterpret_cast<
T
const
*
>
(
address
());}
33
34
};
35
36
37
template
<>
38
inline
int
& AnyData::data<int>() {
return
i
;}
39
40
template
<>
41
inline
int
AnyData::data<int>()
const
{
return
i
;}
42
43
44
45
}
46
47
#endif // CondCore_ORA_AnyData_H
i
int i
Definition:
DBlmapReader.cc:9
ora::AnyData::data
T & data()
Definition:
AnyData.h:29
ora::AnyData::d
double d
Definition:
AnyData.h:20
ora::AnyData::l
long long l
Definition:
AnyData.h:17
ora::AnyData::c
char c
Definition:
AnyData.h:11
ora::AnyData
Definition:
AnyData.h:6
ora::AnyData::ui
unsigned int ui
Definition:
AnyData.h:16
ora::AnyData::v
char v[8]
Definition:
AnyData.h:9
ora::AnyData::ul
unsigned long long ul
Definition:
AnyData.h:18
ora::AnyData::us
unsigned short us
Definition:
AnyData.h:14
ora::AnyData::uc
unsigned char uc
Definition:
AnyData.h:12
ora::AnyData::i
int i
Definition:
AnyData.h:15
ora::AnyData::f
float f
Definition:
AnyData.h:19
ora::AnyData::p
void * p
Definition:
AnyData.h:21
compareJSON.const
string const
Definition:
compareJSON.py:14
ora::AnyData::address
void const * address() const
Definition:
AnyData.h:25
ora::AnyData::b
bool b
Definition:
AnyData.h:10
ora::AnyData::s
short s
Definition:
AnyData.h:13
ora::AnyData::data
T data() const
Definition:
AnyData.h:32
ora::AnyData::ss
char * ss
Definition:
AnyData.h:22
T
long double T
Definition:
Basic3DVectorLD.h:57
ora::AnyData::address
void * address()
Definition:
AnyData.h:24
Generated for CMSSW Reference Manual by
1.8.5