Salome HOME
2D PointLocator remapping now works properly on non-convex polygons.
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingTraits.hxx
index 2d3f91ff49a3a22706d3ea2cd5292a25eb93762c..313e2db710d1440284229ac621ef21de1ec86b33 100644 (file)
@@ -18,8 +18,7 @@
 //
 // Author : Anthony Geay (EDF R&D)
 
-#ifndef __MEDCOUPLINGTRAITS_HXX__
-#define __MEDCOUPLINGTRAITS_HXX__
+#pragma once
 
 #include "MEDCoupling.hxx"
 #include "MCType.hxx"
@@ -30,7 +29,7 @@ namespace MEDCoupling
   template<class T>
   struct MEDCOUPLING_EXPORT Traits
   {
-    typedef T EltType;
+    using EltType = T;
   };
 
   class DataArrayInt32;
@@ -41,7 +40,8 @@ namespace MEDCoupling
   class DataArrayInt64;
   class MEDCouplingFieldDouble;
   class MEDCouplingFieldFloat;
-  class MEDCouplingFieldInt;
+  class MEDCouplingFieldInt32;
+  class MEDCouplingFieldInt64;
   class DataArrayInt32Tuple;
   class DataArrayInt64Tuple;
   class DataArrayFloatTuple;
@@ -58,10 +58,10 @@ namespace MEDCoupling
     static const char FieldTypeName[];
     static const char NPYStr[];
     static const char ReprStr[];
-    typedef DataArrayDouble ArrayType;
-    typedef DataArrayDouble ArrayTypeCh;
-    typedef MEDCouplingFieldDouble FieldType;
-    typedef DataArrayDoubleTuple ArrayTuple;
+    using ArrayType = DataArrayDouble;
+    using ArrayTypeCh = DataArrayDouble;
+    using FieldType = MEDCouplingFieldDouble;
+    using ArrayTuple = DataArrayDoubleTuple;
   };
 
   template<>
@@ -71,10 +71,10 @@ namespace MEDCoupling
     static const char FieldTypeName[];
     static const char NPYStr[];
     static const char ReprStr[];
-    typedef DataArrayFloat ArrayType;
-    typedef DataArrayFloat ArrayTypeCh;
-    typedef MEDCouplingFieldFloat FieldType;
-    typedef DataArrayFloatTuple ArrayTuple;
+    using ArrayType = DataArrayFloat;
+    using ArrayTypeCh = DataArrayFloat;
+    using FieldType = MEDCouplingFieldFloat;
+    using ArrayTuple = DataArrayFloatTuple;
   };
   
   template<>
@@ -85,11 +85,11 @@ namespace MEDCoupling
     static const char NPYStr[];
     static const char ReprStr[];
     static const char VTKReprStr[];
-    typedef DataArrayInt32 ArrayType;
-    typedef DataArrayInt32 ArrayTypeCh;
-    typedef MEDCouplingFieldInt FieldType;
-    typedef DataArrayInt32Tuple ArrayTuple;
-    typedef DataArrayInt32Iterator IteratorType;
+    using ArrayType = DataArrayInt32;
+    using ArrayTypeCh = DataArrayInt32;
+    using FieldType = MEDCouplingFieldInt32;
+    using ArrayTuple = DataArrayInt32Tuple;
+    using IteratorType = DataArrayInt32Iterator;
   };
 
   template<>
@@ -100,22 +100,20 @@ namespace MEDCoupling
     static const char NPYStr[];
     static const char ReprStr[];
     static const char VTKReprStr[];
-    typedef DataArrayInt64 ArrayType;
-    typedef DataArrayInt64 ArrayTypeCh;
-    //typedef MEDCouplingFieldInt64 FieldType;
-    typedef DataArrayInt64Tuple ArrayTuple;
-    typedef DataArrayInt64Iterator IteratorType;
+    using ArrayType = DataArrayInt64;
+    using ArrayTypeCh = DataArrayInt64;
+    using FieldType = MEDCouplingFieldInt64;
+    using ArrayTuple = DataArrayInt64Tuple;
+    using IteratorType = DataArrayInt64Iterator;
   };
 
   template<>
   struct MEDCOUPLING_EXPORT Traits<char>
   {
     static const char ArrayTypeName[];
-    typedef DataArrayByte ArrayTypeCh;
-    typedef DataArrayChar ArrayType;
-    typedef DataArrayByteTuple ArrayTuple;
-    typedef DataArrayByteIterator IteratorType;
+    using ArrayTypeCh = DataArrayByte;
+    using ArrayType = DataArrayChar;
+    using ArrayTuple = DataArrayByteTuple;
+    using IteratorType = DataArrayByteIterator;
   };
 }
-
-#endif