From: eap Date: Tue, 18 Jan 2011 10:55:54 +0000 (+0000) Subject: 0020832: EDF 1359 SMESH : Automatic meshing of boundary layers X-Git-Tag: StartingPortingMED3~160 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=f409dd518659cb3570af6d06c0cba7c9eca99055 0020832: EDF 1359 SMESH : Automatic meshing of boundary layers Make const some requiring methods --- diff --git a/src/SMESHDS/SMESHDS_Mesh.cxx b/src/SMESHDS/SMESHDS_Mesh.cxx index ce6f4680b..57274da28 100644 --- a/src/SMESHDS/SMESHDS_Mesh.cxx +++ b/src/SMESHDS/SMESHDS_Mesh.cxx @@ -1117,7 +1117,7 @@ SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const TopoDS_Shape & S) const /////////////////////////////////////////////////////////////////////////////// /// Return the sub mesh by Id of shape it is linked to /////////////////////////////////////////////////////////////////////////////// -SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const int Index) +SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const int Index) const { TShapeIndexToSubMesh::const_iterator anIter = myShapeIndexToSubMesh.find(Index); if (anIter != myShapeIndexToSubMesh.end()) @@ -1130,10 +1130,10 @@ SMESHDS_SubMesh * SMESHDS_Mesh::MeshElements(const int Index) //function : SubMeshIndices //purpose : //======================================================================= -list SMESHDS_Mesh::SubMeshIndices() +list SMESHDS_Mesh::SubMeshIndices() const { list anIndices; - std::map::iterator anIter = myShapeIndexToSubMesh.begin(); + std::map::const_iterator anIter = myShapeIndexToSubMesh.begin(); for (; anIter != myShapeIndexToSubMesh.end(); anIter++) { anIndices.push_back((*anIter).first); } @@ -1177,7 +1177,7 @@ void SMESHDS_Mesh::ClearScript() //function : HasMeshElements //purpose : //======================================================================= -bool SMESHDS_Mesh::HasMeshElements(const TopoDS_Shape & S) +bool SMESHDS_Mesh::HasMeshElements(const TopoDS_Shape & S) const { if (myShape.IsNull()) MESSAGE("myShape is NULL"); int Index = myIndexToShape.FindIndex(S); diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index 3c3f4d4ca..af0ba92ae 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -414,10 +414,10 @@ public: const TopoDS_Shape & S); void UnSetMeshElementOnShape(const SMDS_MeshElement * anElt, const TopoDS_Shape & S); - bool HasMeshElements(const TopoDS_Shape & S); + bool HasMeshElements(const TopoDS_Shape & S) const; SMESHDS_SubMesh * MeshElements(const TopoDS_Shape & S) const; - SMESHDS_SubMesh * MeshElements(const int Index); - std::list SubMeshIndices(); + SMESHDS_SubMesh * MeshElements(const int Index) const; + std::list SubMeshIndices() const; const std::map& SubMeshes() const { return myShapeIndexToSubMesh; }