Salome HOME
Bug with FindClosestTupleIdAlg fixed (preventing the threshold to be null)
[tools/medcoupling.git] / src / MEDCoupling / MEDCouplingMap.hxx
index 9a5b1cfe3b5a758ccee43bba97912aab4540c6c5..fa17dccfe6bcf1c853790d48b4fb13464c534fd7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -23,6 +23,7 @@
 
 #include "MEDCoupling.hxx"
 #include "MCAuto.hxx"
+#include "MCType.hxx"
 #include "MEDCouplingTimeLabel.hxx"
 #include "MEDCouplingRefCountObject.hxx"
 #include "InterpKernelException.hxx"
 
 namespace MEDCoupling
 {  
-  template<class T>
+  template<class ID, class T>
   class MapKeyVal : public RefCountObject, public TimeLabel
   {
   public:
-    static MCAuto< MapKeyVal<T> > New();
-    std::map<T,T>& data() { return _m; }
-    const std::map<T,T>& data() const { return _m; }
+    static MCAuto< MapKeyVal<ID, T> > New();
+    std::string getClassName() const override { return std::string("MapKeyVal"); }
+    std::map<ID,T>& data() { return _m; }
+    const std::map<ID,T>& data() const { return _m; }
     std::size_t getHeapMemorySizeWithoutChildren() const;
     std::vector<const BigMemoryObject*> getDirectChildrenWithNull() const;
     void updateTime() const { }
@@ -45,10 +47,10 @@ namespace MEDCoupling
     MapKeyVal() { }
     ~MapKeyVal() { }
   private:
-    std::map<T,T> _m;
+    std::map<ID,T> _m;
   };
 
-  using MapII = MapKeyVal<int>;
+  using MapII = MapKeyVal<mcIdType, mcIdType>;
 }
 
 #endif