Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/smesh.git] / src / SMESHDS / SMESHDS_SubMesh.cxx
index 262649e86c6d6bc459f9d5efe316b065bf13c6ac..7cc19700d64fc320431415a1b4a7a7097be241c9 100644 (file)
@@ -29,6 +29,7 @@
 #include "SMESHDS_SubMesh.hxx"
 
 #include "utilities.h"
+#include "SMDS_SetIterator.hxx"
 
 using namespace std;
 
@@ -297,3 +298,16 @@ bool SMESHDS_SubMesh::ContainsSubMesh( const SMESHDS_SubMesh* theSubMesh ) const
 {
   return mySubMeshes.find( theSubMesh ) != mySubMeshes.end();
 }
+
+//=======================================================================
+//function : GetSubMeshIterator
+//purpose  : 
+//=======================================================================
+
+SMESHDS_SubMeshIteratorPtr SMESHDS_SubMesh::GetSubMeshIterator() const
+{
+  typedef set<const SMESHDS_SubMesh*>::const_iterator TIterator;
+  return SMESHDS_SubMeshIteratorPtr
+    ( new SMDS_SetIterator< const SMESHDS_SubMesh*, TIterator >( mySubMeshes.begin(),
+                                                                 mySubMeshes.end()));
+}