Salome HOME
Update copyrights
[tools/medcoupling.git] / src / MEDLoader / MEDLoaderTraits.hxx
1 // Copyright (C) 2016-2019  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay (EDF R&D)
20
21 #ifndef __MEDLOADERTRAITS_HXX__
22 #define __MEDLOADERTRAITS_HXX__
23
24 #include "MEDLoaderDefines.hxx"
25
26 namespace MEDCoupling
27 {
28   template<class T>
29   struct MEDLOADER_EXPORT MLFieldTraits
30   {
31     typedef T EltType;
32   };
33
34   class MEDFileFieldMultiTS;
35   class MEDFileField1TS;
36   class MEDFileIntFieldMultiTS;
37   class MEDFileIntField1TS;
38   class MEDFileFloatFieldMultiTS;
39   class MEDFileFloatField1TS;
40   class MEDFileField1TSWithoutSDA;
41   class MEDFileIntField1TSWithoutSDA;
42   class MEDFileFloatField1TSWithoutSDA;
43   class MEDFileFieldMultiTSWithoutSDA;
44   class MEDFileIntFieldMultiTSWithoutSDA;
45   class MEDFileFloatFieldMultiTSWithoutSDA;
46   
47   template<>
48   struct MEDLOADER_EXPORT MLFieldTraits<double>
49   {
50     typedef MEDFileFieldMultiTSWithoutSDA FMTSWSDAType;
51     typedef MEDFileFieldMultiTS FMTSType;
52     typedef MEDFileField1TS F1TSType;
53     typedef MEDFileField1TSWithoutSDA F1TSWSDAType;
54   };
55
56   template<>
57   struct MEDLOADER_EXPORT MLFieldTraits<float>
58   {
59     typedef MEDFileFloatFieldMultiTSWithoutSDA FMTSWSDAType;
60     typedef MEDFileFloatFieldMultiTS FMTSType;
61     typedef MEDFileFloatField1TS F1TSType;
62     typedef MEDFileFloatField1TSWithoutSDA F1TSWSDAType;
63   };
64   
65   template<>
66   struct MEDLOADER_EXPORT MLFieldTraits<int>
67   {
68     typedef MEDFileIntFieldMultiTSWithoutSDA FMTSWSDAType;
69     typedef MEDFileIntFieldMultiTS FMTSType;
70     typedef MEDFileIntField1TS F1TSType;
71     typedef MEDFileIntField1TSWithoutSDA F1TSWSDAType;
72   };
73
74   template<class T>
75   struct MEDLOADER_EXPORT MLMeshTraits
76   {
77   };
78   
79   class MEDFileUMesh;
80   class MEDFileCMesh;
81   class MEDFileCurveLinearMesh;
82   
83   template<>
84   struct MEDLOADER_EXPORT MLMeshTraits<MEDFileUMesh>
85   {
86     static const char ClassName[];
87   };
88   
89   template<>
90   struct MEDLOADER_EXPORT MLMeshTraits<MEDFileCMesh>
91   {
92     static const char ClassName[];
93   };
94
95   template<>
96   struct MEDLOADER_EXPORT MLMeshTraits<MEDFileCurveLinearMesh>
97   {
98     static const char ClassName[];
99   };
100 }
101
102 #endif