Salome HOME
Update copyrights
[modules/smesh.git] / src / SMESHUtils / SMESH_TypeDefs.hxx
index 9fbc5b076ade419dc7c865af26091a5a74b79c3b..7b4e4b41b3842f7235395da751a26136a4fe5040 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -185,6 +185,21 @@ struct SMESH_TNodeXYZ : public gp_XYZ
 };
 typedef SMESH_TNodeXYZ SMESH_NodeXYZ;
 
+// --------------------------------------------------------------------------------
+// SMESH_Hasher provide methods needed to put mesh data to NCollection maps
+
+struct SMESH_Hasher
+{
+  static Standard_Integer HashCode(const SMDS_MeshElement* e, const Standard_Integer upper)
+  {
+    return ::HashCode( e->GetID(), upper );
+  }
+  static Standard_Boolean IsEqual( const SMDS_MeshElement* e1, const SMDS_MeshElement* e2 )
+  {
+    return ( e1 == e2 );
+  }
+};
+
 //--------------------------------------------------
 /*!
  * \brief Data of a node generated on FACE boundary