source: XIOS/trunk/src/type/type_util.hpp @ 887

Last change on this file since 887 was 887, checked in by mhnguyen, 8 years ago

Adding a new type of element into grid: Scalar

+) Add a new node Scalar for xml
+) Make some change on writing scalar value
+) Reorganize some codes
+) Remove some redundant codes

Test
+) On Curie
+) All tests pass

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 1.9 KB
Line 
1#ifndef __TYPE_UTIL_HPP__
2#define __TYPE_UTIL_HPP__
3
4#include <string>
5namespace 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 CCalendarWrapper;
20    class CVariable;
21    class CVariableGroup;
22    class CInverseAxis;
23    class CInverseAxisGroup;
24    class CZoomAxis;
25    class CZoomAxisGroup;
26    class CInterpolateAxis;
27    class CInterpolateAxisGroup;
28    class CZoomDomain;
29    class CZoomDomainGroup;
30    class CInterpolateDomain;
31    class CInterpolateDomainGroup;
32    class CGenerateRectilinearDomain;
33    class CGenerateRectilinearDomainGroup;
34    class CScalar;
35    class CScalarGroup;
36
37  template <typename T> inline string getStrType(void);
38
39#define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T); }
40
41  macro(short)
42  macro(unsigned short)
43  macro(int)
44  macro(unsigned int)
45  macro(long)
46  macro(unsigned long)
47  macro(float)
48  macro(double)
49  macro(long double)
50  macro(char)
51  macro(unsigned char)
52  macro(wchar_t)
53  macro(bool)
54#undef macro
55
56#define macro(T) template <> inline string getStrType<T>(void) { return std::string(#T); }
57  macro(CDomain)
58  macro(CDomainGroup)
59  macro(CField)
60  macro(CFieldGroup)
61  macro(CGrid)
62  macro(CGridGroup)
63  macro(CAxis)
64  macro(CAxisGroup)
65  macro(CFile)
66  macro(CFileGroup)
67  macro(CContext)
68  macro(CContextGroup)
69  macro(CCalendarWrapper)
70  macro(CVariable)
71  macro(CVariableGroup)
72  macro(CInverseAxis)
73  macro(CInverseAxisGroup)
74  macro(CZoomAxis)
75  macro(CZoomAxisGroup)
76  macro(CInterpolateAxis)
77  macro(CInterpolateAxisGroup)
78  macro(CZoomDomain)
79  macro(CZoomDomainGroup)
80  macro(CInterpolateDomain)
81  macro(CInterpolateDomainGroup)
82  macro(CGenerateRectilinearDomain)
83  macro(CGenerateRectilinearDomainGroup)
84  macro(CScalar)
85  macro(CScalarGroup)
86#undef macro
87}
88
89
90#endif
Note: See TracBrowser for help on using the repository browser.