#include "SMESHDS_SubMesh.hxx"
#include "utilities.h"
+#include "SMDS_SetIterator.hxx"
using namespace std;
{
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()));
+}
#define SMESHDS_WNT_EXPORT
#endif
+class SMESHDS_SubMesh;
+typedef SMDS_Iterator<const SMESHDS_SubMesh*> SMESHDS_SubMeshIterator;
+typedef boost::shared_ptr< SMESHDS_SubMeshIterator > SMESHDS_SubMeshIteratorPtr;
+
class SMESHDS_WNT_EXPORT SMESHDS_SubMesh
{
public:
bool RemoveSubMesh( const SMESHDS_SubMesh* theSubMesh );
bool ContainsSubMesh( const SMESHDS_SubMesh* theSubMesh ) const;
int NbSubMeshes() const { return mySubMeshes.size(); }
+ SMESHDS_SubMeshIteratorPtr GetSubMeshIterator() const;
// for both types
int NbElements() const;