0020832: EDF 1359 SMESH : Automatic meshing of boundary layers

Make const some requiring methods
This commit is contained in:
eap 2011-01-18 10:55:54 +00:00
parent 6a532d5567
commit f409dd5186
2 changed files with 7 additions and 7 deletions

View 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);

View 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; }