17 #define GAUDI_KERNEL_DATATYPEINFO_CPP 1
19 #include "GaudiKernel/System.h"
20 #include "GaudiKernel/DataTypeInfo.h"
21 #include "GaudiKernel/IOpaqueAddress.h"
25 if ( typ ==
"unsigned char" || typ ==
"const unsigned char" )
27 else if ( typ ==
"unsigned short" || typ ==
"const unsigned short" )
29 else if ( typ ==
"unsigned int" || typ ==
"const unsigned int" )
31 else if ( typ ==
"unsigned long" || typ ==
"const unsigned long" )
33 else if ( typ ==
"char" || typ ==
"const char" )
35 else if ( typ ==
"short" || typ ==
"const short" )
37 else if ( typ ==
"int" || typ ==
"const int" )
39 else if ( typ ==
"long" || typ ==
"const long" )
41 else if ( typ ==
"bool" || typ ==
"const bool" )
43 else if ( typ ==
"float" || typ ==
"const float" )
45 else if ( typ ==
"double" || typ ==
"const double" )
47 else if ( typ ==
"std::string" || typ ==
"const std::string" )
49 else if ( typ ==
"char*" || typ ==
"const char*" )
51 else if ( typ ==
"IOpaqueAddress*" || typ ==
"const IOpaqueAddress*" )
53 else if ( typ ==
"SmartRef<DataObject>" || typ ==
"const SmartRef<DataObject>" )
55 else if ( typ ==
"SmartRef<ContainedObject>" || typ ==
"const SmartRef<ContainedObject>" )
57 else if ( typ ==
"void*" || typ ==
"const void*" )
65 if ( typ ==
"unsigned char" || typ ==
"const unsigned char" )
66 return typeid(
unsigned char);
67 else if ( typ ==
"unsigned short" || typ ==
"const unsigned short" )
68 return typeid(
unsigned short);
69 else if ( typ ==
"unsigned int" || typ ==
"const unsigned int" )
70 return typeid(
unsigned int);
71 else if ( typ ==
"unsigned long" || typ ==
"const unsigned long" )
72 return typeid(
unsigned long);
73 else if ( typ ==
"char" || typ ==
"const char" )
75 else if ( typ ==
"short" || typ ==
"const short" )
77 else if ( typ ==
"int" || typ ==
"const int" )
79 else if ( typ ==
"long" || typ ==
"const long" )
81 else if ( typ ==
"bool" || typ ==
"const bool" )
83 else if ( typ ==
"float" || typ ==
"const float" )
85 else if ( typ ==
"double" || typ ==
"const double" )
86 return typeid(double);
87 else if ( typ ==
"std::string" || typ ==
"const std::string" )
88 return typeid(std::string);
89 else if ( typ ==
"char*" || typ ==
"const char*" )
91 else if ( typ ==
"IOpaqueAddress*" || typ ==
"const IOpaqueAddress*" )
93 else if ( typ ==
"SmartRef<DataObject>" || typ ==
"const SmartRef<DataObject>" )
95 else if ( typ ==
"SmartRef<ContainedObject>" || typ ==
"const SmartRef<ContainedObject>" )
97 else if ( typ ==
"void*" || typ ==
"const void*" )
100 return typeid(
void*);
152 if ( typ ==
typeid(
unsigned char) )
154 else if ( typ ==
typeid(
unsigned short) )
156 else if ( typ ==
typeid(
unsigned int) )
158 else if ( typ ==
typeid(
unsigned long) )
160 else if ( typ ==
typeid(
char) )
162 else if ( typ ==
typeid(
short) )
164 else if ( typ ==
typeid(
int) )
166 else if ( typ ==
typeid(
long) )
168 else if ( typ ==
typeid(
bool) )
170 else if ( typ ==
typeid(
float) )
172 else if ( typ ==
typeid(
double) )
174 else if ( typ ==
typeid(std::string) )
176 else if ( typ ==
typeid(
char*) )
184 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.