1 // Copyright (C) 2016-2019 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (EDF R&D)
21 #ifndef __MEDCOUPLINGTRAITS_HXX__
22 #define __MEDCOUPLINGTRAITS_HXX__
24 #include "MEDCoupling.hxx"
31 struct MEDCOUPLING_EXPORT Traits
38 class DataArrayDouble;
42 class MEDCouplingFieldDouble;
43 class MEDCouplingFieldFloat;
44 class MEDCouplingFieldInt;
45 class DataArrayInt32Tuple;
46 class DataArrayInt64Tuple;
47 class DataArrayFloatTuple;
48 class DataArrayDoubleTuple;
49 class DataArrayByteTuple;
50 class DataArrayInt32Iterator;
51 class DataArrayInt64Iterator;
52 class DataArrayByteIterator;
55 struct MEDCOUPLING_EXPORT Traits<double>
57 static const char ArrayTypeName[];
58 static const char FieldTypeName[];
59 static const char NPYStr[];
60 static const char ReprStr[];
61 typedef DataArrayDouble ArrayType;
62 typedef DataArrayDouble ArrayTypeCh;
63 typedef MEDCouplingFieldDouble FieldType;
64 typedef DataArrayDoubleTuple ArrayTuple;
68 struct MEDCOUPLING_EXPORT Traits<float>
70 static const char ArrayTypeName[];
71 static const char FieldTypeName[];
72 static const char NPYStr[];
73 static const char ReprStr[];
74 typedef DataArrayFloat ArrayType;
75 typedef DataArrayFloat ArrayTypeCh;
76 typedef MEDCouplingFieldFloat FieldType;
77 typedef DataArrayFloatTuple ArrayTuple;
81 struct MEDCOUPLING_EXPORT Traits<Int32>
83 static const char ArrayTypeName[];
84 static const char FieldTypeName[];
85 static const char NPYStr[];
86 static const char ReprStr[];
87 static const char VTKReprStr[];
88 typedef DataArrayInt32 ArrayType;
89 typedef DataArrayInt32 ArrayTypeCh;
90 typedef MEDCouplingFieldInt FieldType;
91 typedef DataArrayInt32Tuple ArrayTuple;
92 typedef DataArrayInt32Iterator IteratorType;
96 struct MEDCOUPLING_EXPORT Traits<Int64>
98 static const char ArrayTypeName[];
99 static const char FieldTypeName[];
100 static const char NPYStr[];
101 static const char ReprStr[];
102 static const char VTKReprStr[];
103 typedef DataArrayInt64 ArrayType;
104 typedef DataArrayInt64 ArrayTypeCh;
105 //typedef MEDCouplingFieldInt64 FieldType;
106 typedef DataArrayInt64Tuple ArrayTuple;
107 typedef DataArrayInt64Iterator IteratorType;
111 struct MEDCOUPLING_EXPORT Traits<char>
113 static const char ArrayTypeName[];
114 typedef DataArrayByte ArrayTypeCh;
115 typedef DataArrayChar ArrayType;
116 typedef DataArrayByteTuple ArrayTuple;
117 typedef DataArrayByteIterator IteratorType;