Salome HOME
Speed up "Clear mesh data"
[modules/smesh.git] / src / SMESHDS / SMESHDS_Mesh.hxx
index 967e21a67287b052df1a1bdee3a40138cd77b3d7..f600112c3c541a7e12a625edbd3674346518194c 100644 (file)
@@ -62,6 +62,7 @@ public:
   bool IsEmbeddedMode();
 
   void ShapeToMesh(const TopoDS_Shape & S);
+  TopoDS_Shape ShapeToMesh() const;
   bool AddHypothesis(const TopoDS_Shape & SS, const SMESHDS_Hypothesis * H);
   bool RemoveHypothesis(const TopoDS_Shape & S, const SMESHDS_Hypothesis * H);
   
@@ -381,6 +382,8 @@ public:
   void RemoveFreeNode(const SMDS_MeshNode *, SMESHDS_SubMesh *);
   void RemoveFreeElement(const SMDS_MeshElement *, SMESHDS_SubMesh *);
 
+  void ClearMesh();
+
   bool ChangeElementNodes(const SMDS_MeshElement * elem,
                           const SMDS_MeshNode    * nodes[],
                           const int                nbnodes);
@@ -401,12 +404,11 @@ public:
                             const TopoDS_Shape & S);
   void UnSetMeshElementOnShape(const SMDS_MeshElement * anElt,
                               const TopoDS_Shape & S);
-  TopoDS_Shape ShapeToMesh() const;
   bool HasMeshElements(const TopoDS_Shape & S);
   SMESHDS_SubMesh * MeshElements(const TopoDS_Shape & S) const;
   SMESHDS_SubMesh * MeshElements(const int Index);
   std::list<int> SubMeshIndices();
-  const std::map<int,SMESHDS_SubMesh*>& SubMeshes()
+  const std::map<int,SMESHDS_SubMesh*>& SubMeshes() const
   { return myShapeIndexToSubMesh; }
 
   bool HasHypothesis(const TopoDS_Shape & S);
@@ -438,9 +440,9 @@ private:
   void addNodeToSubmesh( const SMDS_MeshNode* aNode, int Index )
   {
     //Update or build submesh
-    map<int,SMESHDS_SubMesh*>::iterator it = myShapeIndexToSubMesh.find( Index );
+    std::map<int,SMESHDS_SubMesh*>::iterator it = myShapeIndexToSubMesh.find( Index );
     if ( it == myShapeIndexToSubMesh.end() )
-      it = myShapeIndexToSubMesh.insert( make_pair(Index, new SMESHDS_SubMesh() )).first;
+      it = myShapeIndexToSubMesh.insert( std::make_pair(Index, new SMESHDS_SubMesh() )).first;
     it->second->AddNode( aNode ); // add aNode to submesh
     }