Salome HOME
0020832: EDF 1359 SMESH : Automatic meshing of boundary layers
authoreap <eap@opencascade.com>
Tue, 18 Jan 2011 10:55:54 +0000 (10:55 +0000)
committereap <eap@opencascade.com>
Tue, 18 Jan 2011 10:55:54 +0000 (10:55 +0000)
   Make const some requiring methods

src/SMESHDS/SMESHDS_Mesh.cxx
src/SMESHDS/SMESHDS_Mesh.hxx

index ce6f4680b43f696476c3ea46eade2bd1b7c8b43b..57274da28b252131526dd9acaa354599d1304b2c 100644 (file)
@@ -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<int> SMESHDS_Mesh::SubMeshIndices()
+list<int> SMESHDS_Mesh::SubMeshIndices() const
 {
   list<int> anIndices;
-  std::map<int,SMESHDS_SubMesh*>::iterator anIter = myShapeIndexToSubMesh.begin();
+  std::map<int,SMESHDS_SubMesh*>::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);
index 3c3f4d4ca7f9c36d2ab6966af29a102701b65e24..af0ba92ae35b647e6605b4779cd1941744486ad3 100644 (file)
@@ -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<int> SubMeshIndices();
+  SMESHDS_SubMesh * MeshElements(const int Index) const;
+  std::list<int> SubMeshIndices() const;
   const std::map<int,SMESHDS_SubMesh*>& SubMeshes() const
   { return myShapeIndexToSubMesh; }