18 #define GAUDI_KERNEL_DATATYPEINFO_CPP 1
20 #include "GaudiKernel/System.h"
21 #include "GaudiKernel/DataTypeInfo.h"
22 #include "GaudiKernel/IOpaqueAddress.h"
26 if ( typ ==
"unsigned char" || typ ==
"const unsigned char" )
28 else if ( typ ==
"unsigned short" || typ ==
"const unsigned short" )
30 else if ( typ ==
"unsigned int" || typ ==
"const unsigned int" )
32 else if ( typ ==
"unsigned long" || typ ==
"const unsigned long" )
34 else if ( typ ==
"char" || typ ==
"const char" )
36 else if ( typ ==
"short" || typ ==
"const short" )
38 else if ( typ ==
"int" || typ ==
"const int" )
40 else if ( typ ==
"long" || typ ==
"const long" )
42 else if ( typ ==
"bool" || typ ==
"const bool" )
44 else if ( typ ==
"float" || typ ==
"const float" )
46 else if ( typ ==
"double" || typ ==
"const double" )
48 else if ( typ ==
"std::string" || typ ==
"const std::string" )
50 else if ( typ ==
"char*" || typ ==
"const char*" )
52 else if ( typ ==
"IOpaqueAddress*" || typ ==
"const IOpaqueAddress*" )
54 else if ( typ ==
"SmartRef<DataObject>" || typ ==
"const SmartRef<DataObject>" )
56 else if ( typ ==
"SmartRef<ContainedObject>" || typ ==
"const SmartRef<ContainedObject>" )
58 else if ( typ ==
"void*" || typ ==
"const void*" )
66 if ( typ ==
"unsigned char" || typ ==
"const unsigned char" )
67 return typeid(
unsigned char);
68 else if ( typ ==
"unsigned short" || typ ==
"const unsigned short" )
69 return typeid(
unsigned short);
70 else if ( typ ==
"unsigned int" || typ ==
"const unsigned int" )
71 return typeid(
unsigned int);
72 else if ( typ ==
"unsigned long" || typ ==
"const unsigned long" )
73 return typeid(
unsigned long);
74 else if ( typ ==
"char" || typ ==
"const char" )
76 else if ( typ ==
"short" || typ ==
"const short" )
78 else if ( typ ==
"int" || typ ==
"const int" )
80 else if ( typ ==
"long" || typ ==
"const long" )
82 else if ( typ ==
"bool" || typ ==
"const bool" )
84 else if ( typ ==
"float" || typ ==
"const float" )
86 else if ( typ ==
"double" || typ ==
"const double" )
87 return typeid(double);
88 else if ( typ ==
"std::string" || typ ==
"const std::string" )
89 return typeid(std::string);
90 else if ( typ ==
"char*" || typ ==
"const char*" )
92 else if ( typ ==
"IOpaqueAddress*" || typ ==
"const IOpaqueAddress*" )
94 else if ( typ ==
"SmartRef<DataObject>" || typ ==
"const SmartRef<DataObject>" )
96 else if ( typ ==
"SmartRef<ContainedObject>" || typ ==
"const SmartRef<ContainedObject>" )
98 else if ( typ ==
"void*" || typ ==
"const void*" )
101 return typeid(
void*);
153 if ( typ ==
typeid(
unsigned char) )
155 else if ( typ ==
typeid(
unsigned short) )
157 else if ( typ ==
typeid(
unsigned int) )
159 else if ( typ ==
typeid(
unsigned long) )
161 else if ( typ ==
typeid(
char) )
163 else if ( typ ==
typeid(
short) )
165 else if ( typ ==
typeid(
int) )
167 else if ( typ ==
typeid(
long) )
169 else if ( typ ==
typeid(
bool) )
171 else if ( typ ==
typeid(
float) )
173 else if ( typ ==
typeid(
double) )
175 else if ( typ ==
typeid(std::string) )
177 else if ( typ ==
typeid(
char*) )
185 else if ( typ ==
typeid(
void*) )
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
static Type idByName(const std::string &typ)
Access to type information.
Opaque address interface definition.
static std::string name(long typ)
A DataObject is the base class of any identifiable object on any data store.
static const std::type_info & typeByName(const std::string &typ)
Access to type information.