]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHDS/SMESHDS_Mesh.cxx
Salome HOME
+ operator<<(const SMESH::string_array& theArg);
[modules/smesh.git] / src / SMESHDS / SMESHDS_Mesh.cxx
index 7511392abf094f86d91d6110329e21426d63de1b..d5c7e172fe4d0dbecc188dc6c07d12f2f520aab7 100644 (file)
@@ -74,6 +74,8 @@ bool SMESHDS_Mesh::IsEmbeddedMode()
 //================================================================================
 /*!
  * \brief Store ID persistent during lifecycle
+ *
+ * Initially it was used to have a persistent reference to the mesh from the hypothesis
  */
 //================================================================================
 
@@ -1143,6 +1145,21 @@ SMESHDS_Mesh::GetHypothesis(const TopoDS_Shape & S) const
   return empty;
 }
 
+//================================================================================
+/*!
+ * \brief returns true if the hypothesis is assigned to any sub-shape
+ */
+//================================================================================
+
+bool SMESHDS_Mesh::IsUsedHypothesis(const SMESHDS_Hypothesis * H) const
+{
+  ShapeToHypothesis::Iterator s2h( myShapeToHypothesis );
+  for ( ; s2h.More(); s2h.Next() )
+    if ( std::find( s2h.Value().begin(), s2h.Value().end(), H ) != s2h.Value().end() )
+      return true;
+  return false;
+}
+
 //=======================================================================
 //function : GetScript
 //purpose  :