From: msv Date: Fri, 14 Jan 2005 13:44:21 +0000 (+0000) Subject: corrections due to improvement of SMDS X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e9160b6567d2f0fe03dacc4d5b667762f2278455;p=modules%2Fsmesh.git corrections due to improvement of SMDS --- diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 3e31f7151..2bf885a7a 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -2145,7 +2145,7 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink, SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next(); if ( !aFace ) continue; - aSetOfFaces.insert( aFace ); + aSetOfFaces.Add( aFace ); } // take all faces that shared second node anItr = theLink.myNode2->facesIterator(); @@ -2153,7 +2153,7 @@ void ManifoldPart::getFacesByLink( const ManifoldPart::Link& theLink, for ( ; anItr->more(); ) { SMDS_MeshFace* aFace = (SMDS_MeshFace*)anItr->next(); - if ( aSetOfFaces.find( aFace ) != aSetOfFaces.end() ) + if ( aSetOfFaces.Contains( aFace ) ) theFaces.push_back( aFace ); } } diff --git a/src/SMESHDS/SMESHDS_Mesh.hxx b/src/SMESHDS/SMESHDS_Mesh.hxx index dece6ab48..459d30848 100644 --- a/src/SMESHDS/SMESHDS_Mesh.hxx +++ b/src/SMESHDS/SMESHDS_Mesh.hxx @@ -42,6 +42,7 @@ #include #include #include +#include //Not portable see http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#5_4 to know more. #ifdef __GNUC__ @@ -178,12 +179,12 @@ public: bool HasMeshElements(const TopoDS_Shape & S); SMESHDS_SubMesh * MeshElements(const TopoDS_Shape & S); SMESHDS_SubMesh * MeshElements(const int Index); - list SubMeshIndices(); + std::list SubMeshIndices(); const std::map& SubMeshes() { return myShapeIndexToSubMesh; } bool HasHypothesis(const TopoDS_Shape & S); - const list& GetHypothesis(const TopoDS_Shape & S) const; + const std::list& GetHypothesis(const TopoDS_Shape & S) const; SMESHDS_Script * GetScript(); void ClearScript(); int ShapeToIndex(const TopoDS_Shape & aShape); @@ -200,7 +201,7 @@ public: void AddGroup (SMESHDS_GroupBase* theGroup) { myGroups.insert(theGroup); } void RemoveGroup (SMESHDS_GroupBase* theGroup) { myGroups.erase(theGroup); } int GetNbGroups() const { return myGroups.size(); } - const set& GetGroups() const { return myGroups; } + const std::set& GetGroups() const { return myGroups; } bool IsGroupOfSubShapes (const TopoDS_Shape& aSubShape) const; @@ -219,8 +220,8 @@ private: int myMeshID; TopoDS_Shape myShape; TopTools_IndexedMapOfShape myIndexToShape; - map myShapeIndexToSubMesh; - set myGroups; + std::map myShapeIndexToSubMesh; + std::set myGroups; SMESHDS_Script* myScript; };