PAL16202 (Propagation 1D on edges group)

+  SMESHDS_SubMeshIteratorPtr GetSubMeshIterator() const;
This commit is contained in:
eap 2007-11-07 09:35:51 +00:00
parent 1a2cff525d
commit 04c27b0ed7
2 changed files with 19 additions and 0 deletions

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

View File

@ -32,6 +32,10 @@
#include "SMDS_Mesh.hxx"
#include <set>
class SMESHDS_SubMesh;
typedef SMDS_Iterator<const SMESHDS_SubMesh*> SMESHDS_SubMeshIterator;
typedef boost::shared_ptr< SMESHDS_SubMeshIterator > SMESHDS_SubMeshIteratorPtr;
class SMESHDS_EXPORT SMESHDS_SubMesh
{
public:
@ -49,6 +53,7 @@ class SMESHDS_EXPORT SMESHDS_SubMesh
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;