| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Static Public Member Functions | Private Member Functions | List of all members
DataTypeInfo Class Reference

Small class which allows access to internal type IDs. More...

`#include <GaudiKernel/DataTypeInfo.h>`

## Public Types
enum | Type { UNKNOWN = 0, UCHAR, USHORT, UINT, ULONG, CHAR, SHORT, INT, LONG, BOOL, FLOAT, DOUBLE, STRING, NTCHAR, OBJECT_REF, CONTAINED_REF, POINTER, OBJECT_ADDR, LONG_STRING, LONG_NTCHAR, LONGLONG, ULONGLONG }

## Static Public Member Functions
static Type | ID (const bool)
| Access to type information: bool. More...
static Type | ID (const char)
| Access to type information: char. More...
static Type | ID (const short)
| Access to type information: short. More...
static Type | ID (const int)
| Access to type information: int. More...
static Type | ID (const long)
| Access to type information: long. More...
static Type | ID (const long long)
| Access to type information: long long. More...
static Type | ID (const unsigned char)
| Access to type information: unsigned char. More...
static Type | ID (const unsigned short)
| Access to type information: unsigned short. More...
static Type | ID (const unsigned int)
| Access to type information: unsigned int. More...
static Type | ID (const unsigned long)
| Access to type information: unsigned long. More...
static Type | ID (const unsigned long long)
| Access to type information: unsigned long long. More...
static Type | ID (const float)
| Access to type information: float. More...
static Type | ID (const double)
| Access to type information: float. More...
static Type | ID (const std::string &)
| Access to type information: std::string. More...
static Type | ID (const char *)
| Access to type information: char* (NULL terminated) More...
static Type | ID (const IOpaqueAddress *)
| Access to type information: IOpaqueAddress. More...
static Type | ID (const void *)
| Access to type information: Pointers. More...
static Type | ID (const SmartRef< DataObject > &)
| Access to type information: DataObject. More...
static Type | ID (const SmartRef< ContainedObject > &)
| Access to type information: Contained object. More...
static Type | ID (const std::type_info &typ)
| Access to type information: the reverse way. More...
static const std::type_info & | type (long typ)
| Access to type information: the reverse way. More...
static long | size (long typ)
| Access to type information: the reverse way. More...
static long | size (const std::type_info &typ)
| Access to type information: the reverse way. More...
static int | copy (void *tar, const void *src, long typ, int numObj)
| Copy data. More...
static std::string | name (long typ)
static std::string | name (const std::type_info &typ)
static Type | idByName (const std::string &typ)
| Access to type information. More...
static const std::type_info & | typeByName (const std::string &typ)
| Access to type information. More...

## Private Member Functions
| DataTypeInfo ()

## Detailed Description

Small class which allows access to internal type IDs.

Definition at line 16 of file DataTypeInfo.h.

## Member Enumeration Documentation

enum DataTypeInfo::Type

Enumerator
UNKNOWN |
UCHAR |
USHORT |
UINT |
ULONG |
CHAR |
SHORT |
INT |
LONG |
BOOL |
FLOAT |
DOUBLE |
STRING |
NTCHAR |
OBJECT_REF |
CONTAINED_REF |
POINTER |
OBJECT_ADDR |
LONG_STRING |
LONG_NTCHAR |
LONGLONG |
ULONGLONG |

Definition at line 22 of file DataTypeInfo.h.

22 {
23 UNKNOWN = 0,
24 UCHAR, USHORT, UINT, ULONG,
25 CHAR, SHORT, INT, LONG,
26 BOOL, FLOAT, DOUBLE,
27 STRING, NTCHAR,
28 OBJECT_REF, CONTAINED_REF, POINTER, OBJECT_ADDR,
29 LONG_STRING, LONG_NTCHAR, LONGLONG, ULONGLONG
30 };
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::ULONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::LONG_NTCHAR
Definition: DataTypeInfo.h:29
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::LONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
DataTypeInfo::LONG_STRING
Definition: DataTypeInfo.h:29
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26

## Constructor & Destructor Documentation

DataTypeInfo::DataTypeInfo | ( |  | ) |
| inline private

Definition at line 19 of file DataTypeInfo.h.

19 {}

## Member Function Documentation

static int DataTypeInfo::copy | ( | void * | tar,
|  | const void * | src,
|  | long | typ,
|  | int | numObj
| ) |  |
| inline static

Copy data.

Definition at line 217 of file DataTypeInfo.h.

217 {
218 switch(typ) {
219 case UCHAR: numObj *= sizeof(unsigned char); break;
220 case USHORT: numObj *= sizeof(unsigned short); break;
221 case UINT: numObj *= sizeof(unsigned int); break;
222 case ULONG: numObj *= sizeof(unsigned long); break;
223 case ULONGLONG: numObj *= sizeof(unsigned long long); break;
224 case CHAR: numObj *= sizeof(char); break;
225 case SHORT: numObj *= sizeof(short); break;
226 case INT: numObj *= sizeof(int); break;
227 case LONG: numObj *= sizeof(long); break;
228 case LONGLONG: numObj *= sizeof(long long); break;
229 case BOOL: numObj *= sizeof(bool); break;
230 case FLOAT: numObj *= sizeof(float); break;
231 case DOUBLE: numObj *= sizeof(double); break;
232 case UNKNOWN:
233 default: numObj *= 0; break;
234 }
235 memcpy(tar, src, numObj);
236 return numObj;
237 }
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
std::memcpy
T memcpy(T...args)
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::ULONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::LONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26

static Type DataTypeInfo::ID | ( | const bool |  | ) |
| inline static

Access to type information: bool.

Definition at line 32 of file DataTypeInfo.h.

32 { return BOOL; }
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26

static Type DataTypeInfo::ID | ( | const char |  | ) |
| inline static

Access to type information: char.

Definition at line 34 of file DataTypeInfo.h.

34 { return CHAR; }
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25

static Type DataTypeInfo::ID | ( | const short |  | ) |
| inline static

Access to type information: short.

Definition at line 36 of file DataTypeInfo.h.

36 { return SHORT; }
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25

static Type DataTypeInfo::ID | ( | const int |  | ) |
| inline static

Access to type information: int.

Definition at line 38 of file DataTypeInfo.h.

38 { return INT; }
DataTypeInfo::INT
Definition: DataTypeInfo.h:25

static Type DataTypeInfo::ID | ( | const long |  | ) |
| inline static

Access to type information: long.

Definition at line 40 of file DataTypeInfo.h.

40 { return LONG; }
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25

static Type DataTypeInfo::ID | ( | const long | long | ) |
| inline static

Access to type information: long long.

Definition at line 42 of file DataTypeInfo.h.

42 { return LONGLONG; }
DataTypeInfo::LONGLONG
Definition: DataTypeInfo.h:29

static Type DataTypeInfo::ID | ( | const unsigned | char | ) |
| inline static

Access to type information: unsigned char.

Definition at line 44 of file DataTypeInfo.h.

44 { return UCHAR; }
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24

static Type DataTypeInfo::ID | ( | const unsigned | short | ) |
| inline static

Access to type information: unsigned short.

Definition at line 46 of file DataTypeInfo.h.

46 { return USHORT; }
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24

static Type DataTypeInfo::ID | ( | const unsigned | int | ) |
| inline static

Access to type information: unsigned int.

Definition at line 48 of file DataTypeInfo.h.

48 { return UINT; }
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24

static Type DataTypeInfo::ID | ( | const unsigned | long | ) |
| inline static

Access to type information: unsigned long.

Definition at line 50 of file DataTypeInfo.h.

50 { return ULONG; }
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24

static Type DataTypeInfo::ID | ( | const unsigned long | long | ) |
| inline static

Access to type information: unsigned long long.

Definition at line 52 of file DataTypeInfo.h.

52 { return ULONGLONG; }
DataTypeInfo::ULONGLONG
Definition: DataTypeInfo.h:29

static Type DataTypeInfo::ID | ( | const float |  | ) |
| inline static

Access to type information: float.

Definition at line 54 of file DataTypeInfo.h.

54 { return FLOAT; }
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26

static Type DataTypeInfo::ID | ( | const double |  | ) |
| inline static

Access to type information: float.

Definition at line 56 of file DataTypeInfo.h.

56 { return DOUBLE; }
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26

static Type DataTypeInfo::ID | ( | const std::string & |  | ) |
| inline static

Access to type information: std::string.

Definition at line 58 of file DataTypeInfo.h.

58 { return STRING; }
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27

static Type DataTypeInfo::ID | ( | const char * |  | ) |
| inline static

Access to type information: char* (NULL terminated)

Definition at line 60 of file DataTypeInfo.h.

60 { return NTCHAR; }
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27

static Type DataTypeInfo::ID | ( | const IOpaqueAddress * |  | ) |
| inline static

Access to type information: IOpaqueAddress.

Definition at line 62 of file DataTypeInfo.h.

62 { return OBJECT_ADDR; }
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28

static Type DataTypeInfo::ID | ( | const void * |  | ) |
| inline static

Access to type information: Pointers.

Definition at line 64 of file DataTypeInfo.h.

64 { return POINTER; }
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28

static Type DataTypeInfo::ID | ( | const SmartRef< DataObject > & |  | ) |
| inline static

Access to type information: DataObject.

Definition at line 66 of file DataTypeInfo.h.

66 { return OBJECT_REF; }
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28

static Type DataTypeInfo::ID | ( | const SmartRef< ContainedObject > & |  | ) |
| inline static

Access to type information: Contained object.

Definition at line 68 of file DataTypeInfo.h.

68 { return CONTAINED_REF; }
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28

static Type DataTypeInfo::ID | ( | const std::type_info & | typ | ) |
| inline static

Access to type information: the reverse way.

Definition at line 71 of file DataTypeInfo.h.

71 {
72 if ( typ == typeid(unsigned char) )
73 return UCHAR;
74 else if ( typ == typeid(unsigned short) )
75 return USHORT;
76 else if ( typ == typeid(unsigned int) )
77 return UINT;
78 else if ( typ == typeid(unsigned long) )
79 return ULONG;
80 else if ( typ == typeid(unsigned long long) )
81 return ULONGLONG;
82 else if ( typ == typeid(char) )
83 return CHAR;
84 else if ( typ == typeid(short) )
85 return SHORT;
86 else if ( typ == typeid(int) )
87 return INT;
88 else if ( typ == typeid(long) )
89 return LONG;
90 else if ( typ == typeid(long long) )
91 return LONGLONG;
92 else if ( typ == typeid(bool) )
93 return BOOL;
94 else if ( typ == typeid(float) )
95 return FLOAT;
96 else if ( typ == typeid(double) )
97 return DOUBLE;
98 else if ( typ == typeid(std::string) )
99 return STRING;
100 else if ( typ == typeid(char*) )
101 return NTCHAR;
102 else if ( typ == typeid(SmartRef<DataObject>) )
103 return OBJECT_REF;
104 else if ( typ == typeid(SmartRef<ContainedObject>) )
105 return CONTAINED_REF;
106 else if ( typ == typeid(IOpaqueAddress*) )
107 return OBJECT_ADDR;
108 else if ( typ == typeid(void*) )
109 return POINTER;
110 else
111 return UNKNOWN;
112 }
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
SmartRef< DataObject >
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
std::string
STL class.
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::ULONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::LONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23

DataTypeInfo::Type DataTypeInfo::idByName | ( | const std::string & | typ | ) |
| static

Access to type information.

Definition at line 24 of file DataTypeInfo.cpp.

24 {
25 if ( typ == "unsigned char" || typ == "const unsigned char" )
26 return UCHAR;
27 else if ( typ == "unsigned short" || typ == "const unsigned short" )
28 return USHORT;
29 else if ( typ == "unsigned int" || typ == "const unsigned int" )
30 return UINT;
31 else if ( typ == "unsigned long" || typ == "const unsigned long" )
32 return ULONG;
33 else if ( typ == "char" || typ == "const char" )
34 return CHAR;
35 else if ( typ == "short" || typ == "const short" )
36 return SHORT;
37 else if ( typ == "int" || typ == "const int" )
38 return INT;
39 else if ( typ == "long" || typ == "const long" )
40 return LONG;
41 else if ( typ == "bool" || typ == "const bool" )
42 return BOOL;
43 else if ( typ == "float" || typ == "const float" )
44 return FLOAT;
45 else if ( typ == "double" || typ == "const double" )
46 return DOUBLE;
47 else if ( typ == "std::string" || typ == "const std::string" )
48 return STRING;
49 else if ( typ == "char*" || typ == "const char*" )
50 return NTCHAR;
51 else if ( typ == "IOpaqueAddress*" || typ == "const IOpaqueAddress*" )
52 return OBJECT_ADDR;
53 else if ( typ == "SmartRef<DataObject>" || typ == "const SmartRef<DataObject>" )
54 return OBJECT_REF;
55 else if ( typ == "SmartRef<ContainedObject>" || typ == "const SmartRef<ContainedObject>" )
56 return CONTAINED_REF;
57 else if ( typ == "void*" || typ == "const void*" )
58 return POINTER;
59 else
60 return UNKNOWN;
61 }
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26

std::string DataTypeInfo::name | ( | long | typ | ) |
| static

Definition at line 104 of file DataTypeInfo.cpp.

104 {
105 switch(typ) {
106 case UCHAR:
107 return System::typeinfoName(typeid(unsigned char));
108 case USHORT:
109 return System::typeinfoName(typeid(unsigned short));
110 case UINT:
111 return System::typeinfoName(typeid(unsigned int));
112 case ULONG:
113 return System::typeinfoName(typeid(unsigned long));
114 case CHAR:
115 return System::typeinfoName(typeid(char));
116 case SHORT:
117 return System::typeinfoName(typeid(short));
118 case INT:
119 return System::typeinfoName(typeid(int));
120 case LONG:
121 return System::typeinfoName(typeid(long));
122 case BOOL:
123 return System::typeinfoName(typeid(bool));
124 case FLOAT:
125 return System::typeinfoName(typeid(float));
126 case DOUBLE:
127 return System::typeinfoName(typeid(double));
128 case STRING:
129 return System::typeinfoName(typeid(std::string));
130 case LONG_STRING:
131 return System::typeinfoName(typeid(std::string));
132 case NTCHAR:
133 return System::typeinfoName(typeid(char*));
134 case LONG_NTCHAR:
135 return System::typeinfoName(typeid(char*));
136 case OBJECT_ADDR:
137 return System::typeinfoName(typeid(IOpaqueAddress*));
138 case OBJECT_REF:
139 return System::typeinfoName(typeid(SmartRef<DataObject>));
140 case CONTAINED_REF:
141 return System::typeinfoName(typeid(SmartRef<ContainedObject>));
142 case POINTER:
143 return System::typeinfoName(typeid(void*));
144 case UNKNOWN:
145 default:
146 return "";
147 }
148 }
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
SmartRef< DataObject >
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
std::string
STL class.
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::LONG_NTCHAR
Definition: DataTypeInfo.h:29
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
DataTypeInfo::LONG_STRING
Definition: DataTypeInfo.h:29
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23

std::string DataTypeInfo::name | ( | const std::type_info & | typ | ) |
| static

Definition at line 151 of file DataTypeInfo.cpp.

151 {
152 if ( typ == typeid(unsigned char) )
153 return DataTypeInfo::name(UCHAR);
154 else if ( typ == typeid(unsigned short) )
155 return DataTypeInfo::name(USHORT);
156 else if ( typ == typeid(unsigned int) )
157 return DataTypeInfo::name(UINT);
158 else if ( typ == typeid(unsigned long) )
159 return DataTypeInfo::name(ULONG);
160 else if ( typ == typeid(char) )
161 return DataTypeInfo::name(CHAR);
162 else if ( typ == typeid(short) )
163 return DataTypeInfo::name(SHORT);
164 else if ( typ == typeid(int) )
165 return DataTypeInfo::name(INT);
166 else if ( typ == typeid(long) )
167 return DataTypeInfo::name(LONG);
168 else if ( typ == typeid(bool) )
169 return DataTypeInfo::name(BOOL);
170 else if ( typ == typeid(float) )
171 return DataTypeInfo::name(FLOAT);
172 else if ( typ == typeid(double) )
173 return DataTypeInfo::name(DOUBLE);
174 else if ( typ == typeid(std::string) )
175 return DataTypeInfo::name(STRING);
176 else if ( typ == typeid(char*) )
177 return DataTypeInfo::name(NTCHAR);
178 else if ( typ == typeid(IOpaqueAddress*) )
179 return DataTypeInfo::name(OBJECT_ADDR);
180 else if ( typ == typeid(SmartRef<DataObject>) )
181 return DataTypeInfo::name(OBJECT_REF);
182 else if ( typ == typeid(SmartRef<ContainedObject>) )
183 return DataTypeInfo::name(CONTAINED_REF);
184 else if ( typ == typeid(void*) )
185 return DataTypeInfo::name(POINTER);
186 else
187 return DataTypeInfo::name(UNKNOWN);
188 }
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
SmartRef< DataObject >
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
std::string
STL class.
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
DataTypeInfo::name
static std::string name(long typ)
Definition: DataTypeInfo.cpp:104

static long DataTypeInfo::size | ( | long | typ | ) |
| inline static

Access to type information: the reverse way.

Definition at line 165 of file DataTypeInfo.h.

165 {
166 switch(typ) {
167 case UCHAR:
168 return sizeof(unsigned char);
169 case USHORT:
170 return sizeof(unsigned short);
171 case UINT:
172 return sizeof(unsigned int);
173 case ULONG:
174 return sizeof(unsigned long);
175 case ULONGLONG:
176 return sizeof(unsigned long long);
177 case CHAR:
178 return sizeof(char);
179 case SHORT:
180 return sizeof(short);
181 case INT:
182 return sizeof(int);
183 case LONG:
184 return sizeof(long);
185 case LONGLONG:
186 return sizeof(long long);
187 case BOOL:
188 return sizeof(bool);
189 case FLOAT:
190 return sizeof(float);
191 case DOUBLE:
192 return sizeof(double);
193 case STRING:
194 return sizeof(std::string);
195 case LONG_STRING:
196 return sizeof(std::string);
197 case NTCHAR:
198 return sizeof(char*);
199 case LONG_NTCHAR:
200 return sizeof(char*);
201 case OBJECT_ADDR:
202 case POINTER:
203 case OBJECT_REF:
204 case CONTAINED_REF:
205 case UNKNOWN:
206 default:
207 return 0;
208 }
209 }
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
std::string
STL class.
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::ULONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::LONG_NTCHAR
Definition: DataTypeInfo.h:29
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::LONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
DataTypeInfo::LONG_STRING
Definition: DataTypeInfo.h:29
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26

static long DataTypeInfo::size | ( | const std::type_info & | typ | ) |
| inline static

Access to type information: the reverse way.

Definition at line 212 of file DataTypeInfo.h.

212 {
213 return size( ID(typ) );
214 }
DataTypeInfo::ID
static Type ID(const bool)
Access to type information: bool.
Definition: DataTypeInfo.h:32
DataTypeInfo::size
static long size(long typ)
Access to type information: the reverse way.
Definition: DataTypeInfo.h:165

static const std::type_info& DataTypeInfo::type | ( | long | typ | ) |
| inline static

Access to type information: the reverse way.

Definition at line 115 of file DataTypeInfo.h.

115 {
116 switch(typ) {
117 case UCHAR:
118 return typeid(unsigned char);
119 case USHORT:
120 return typeid(unsigned short);
121 case UINT:
122 return typeid(unsigned int);
123 case ULONG:
124 return typeid(unsigned long);
125 case ULONGLONG:
126 return typeid(unsigned long long);
127 case CHAR:
128 return typeid(char);
129 case SHORT:
130 return typeid(short);
131 case INT:
132 return typeid(int);
133 case LONG:
134 return typeid(long);
135 case LONGLONG:
136 return typeid(long long);
137 case BOOL:
138 return typeid(bool);
139 case FLOAT:
140 return typeid(float);
141 case DOUBLE:
142 return typeid(double);
143 case LONG_STRING:
144 return typeid(std::string);
145 case STRING:
146 return typeid(std::string);
147 case NTCHAR:
148 return typeid(char*);
149 case LONG_NTCHAR:
150 return typeid(char*);
151 case OBJECT_REF:
152 return typeid(SmartRef<DataObject>);
153 case CONTAINED_REF:
154 return typeid(SmartRef<ContainedObject>);
155 case OBJECT_ADDR:
156 return typeid(IOpaqueAddress*);
157 case POINTER:
158 case UNKNOWN:
159 default:
160 return typeid(void*);
161 }
162 }
DataTypeInfo::OBJECT_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::POINTER
Definition: DataTypeInfo.h:28
DataTypeInfo::INT
Definition: DataTypeInfo.h:25
DataTypeInfo::CHAR
Definition: DataTypeInfo.h:25
SmartRef< DataObject >
DataTypeInfo::STRING
Definition: DataTypeInfo.h:27
DataTypeInfo::SHORT
Definition: DataTypeInfo.h:25
DataTypeInfo::NTCHAR
Definition: DataTypeInfo.h:27
std::string
STL class.
DataTypeInfo::UINT
Definition: DataTypeInfo.h:24
DataTypeInfo::USHORT
Definition: DataTypeInfo.h:24
DataTypeInfo::BOOL
Definition: DataTypeInfo.h:26
DataTypeInfo::UCHAR
Definition: DataTypeInfo.h:24
DataTypeInfo::ULONG
Definition: DataTypeInfo.h:24
DataTypeInfo::LONG
Definition: DataTypeInfo.h:25
DataTypeInfo::DOUBLE
Definition: DataTypeInfo.h:26
DataTypeInfo::UNKNOWN
Definition: DataTypeInfo.h:23
DataTypeInfo::ULONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::LONG_NTCHAR
Definition: DataTypeInfo.h:29
DataTypeInfo::CONTAINED_REF
Definition: DataTypeInfo.h:28
DataTypeInfo::LONGLONG
Definition: DataTypeInfo.h:29
DataTypeInfo::OBJECT_ADDR
Definition: DataTypeInfo.h:28
DataTypeInfo::LONG_STRING
Definition: DataTypeInfo.h:29
DataTypeInfo::FLOAT
Definition: DataTypeInfo.h:26
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23

const std::type_info & DataTypeInfo::typeByName | ( | const std::string & | typ | ) |
| static

Access to type information.

Definition at line 64 of file DataTypeInfo.cpp.

64 {
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" )
74 return typeid(char);
75 else if ( typ == "short" || typ == "const short" )
76 return typeid(short);
77 else if ( typ == "int" || typ == "const int" )
78 return typeid(int);
79 else if ( typ == "long" || typ == "const long" )
80 return typeid(long);
81 else if ( typ == "bool" || typ == "const bool" )
82 return typeid(bool);
83 else if ( typ == "float" || typ == "const float" )
84 return typeid(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*" )
90 return typeid(char*);
91 else if ( typ == "IOpaqueAddress*" || typ == "const IOpaqueAddress*" )
92 return typeid(IOpaqueAddress);
93 else if ( typ == "SmartRef<DataObject>" || typ == "const SmartRef<DataObject>" )
94 return typeid(DataObject*);
95 else if ( typ == "SmartRef<ContainedObject>" || typ == "const SmartRef<ContainedObject>" )
96 return typeid(SmartRef<ContainedObject>);
97 else if ( typ == "void*" || typ == "const void*" )
98 return typeid(void*);
99 else
100 return typeid(void*);
101 }
SmartRef< ContainedObject >
std::string
STL class.
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30

The documentation for this class was generated from the following files:

- GaudiKernel/GaudiKernel/DataTypeInfo.h
- GaudiKernel/src/Lib/DataTypeInfo.cpp