1 // Copyright (C) 2016-2022 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)
23 #include "MEDCoupling.hxx"
30 struct MEDCOUPLING_EXPORT Traits
37 class DataArrayDouble;
41 class MEDCouplingFieldDouble;
42 class MEDCouplingFieldFloat;
43 class MEDCouplingFieldInt32;
44 class MEDCouplingFieldInt64;
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 using ArrayType = DataArrayDouble;
62 using ArrayTypeCh = DataArrayDouble;
63 using FieldType = MEDCouplingFieldDouble;
64 using ArrayTuple = DataArrayDoubleTuple;
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 using ArrayType = DataArrayFloat;
75 using ArrayTypeCh = DataArrayFloat;
76 using FieldType = MEDCouplingFieldFloat;
77 using ArrayTuple = DataArrayFloatTuple;
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 using ArrayType = DataArrayInt32;
89 using ArrayTypeCh = DataArrayInt32;
90 using FieldType = MEDCouplingFieldInt32;
91 using ArrayTuple = DataArrayInt32Tuple;
92 using IteratorType = DataArrayInt32Iterator;
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 using ArrayType = DataArrayInt64;
104 using ArrayTypeCh = DataArrayInt64;
105 using FieldType = MEDCouplingFieldInt64;
106 using ArrayTuple = DataArrayInt64Tuple;
107 using IteratorType = DataArrayInt64Iterator;
111 struct MEDCOUPLING_EXPORT Traits<char>
113 static const char ArrayTypeName[];
114 using ArrayTypeCh = DataArrayByte;
115 using ArrayType = DataArrayChar;
116 using ArrayTuple = DataArrayByteTuple;
117 using IteratorType = DataArrayByteIterator;