source:
vendors/XIOS/current/src/type/type_util.hpp
@
3428
Last change on this file since 3428 was 3428, checked in by rblod, 12 years ago | |
---|---|
File size: 1.2 KB |
Line | |
---|---|
1 | #ifndef __TYPE_UTIL_HPP__ |
2 | #define __TYPE_UTIL_HPP__ |
3 | |
4 | #include <string> |
5 | namespace xios |
6 | { |
7 | class CDomain ; |
8 | class CDomainGroup; |
9 | class CField; |
10 | class CFieldGroup; |
11 | class CGrid; |
12 | class CGridGroup; |
13 | class CAxis; |
14 | class CAxisGroup; |
15 | class CFile; |
16 | class CFileGroup; |
17 | class CContext; |
18 | class CContextGroup; |
19 | class CVariable ; |
20 | class CVariableGroup ; |
21 | |
22 | template <typename T> inline string getStrType(void) ; |
23 | |
24 | #define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T) ; } |
25 | |
26 | macro(short) |
27 | macro(unsigned short) |
28 | macro(int) |
29 | macro(unsigned int) |
30 | macro(long) |
31 | macro(unsigned long) |
32 | macro(float) |
33 | macro(double) |
34 | macro(long double) |
35 | macro(char) |
36 | macro(unsigned char) |
37 | macro(wchar_t) |
38 | macro(bool) |
39 | #undef macro |
40 | |
41 | #define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T) ; } |
42 | macro(CDomain) |
43 | macro(CDomainGroup) |
44 | macro(CField) |
45 | macro(CFieldGroup) |
46 | macro(CGrid) |
47 | macro(CGridGroup) |
48 | macro(CAxis) |
49 | macro(CAxisGroup) |
50 | macro(CFile) |
51 | macro(CFileGroup) |
52 | macro(CContext) |
53 | macro(CContextGroup) |
54 | macro(CVariable) |
55 | macro(CVariableGroup) |
56 | |
57 | |
58 | #undef macro |
59 | |
60 | } |
61 | |
62 | |
63 | #endif |
Note: See TracBrowser
for help on using the repository browser.