X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshGroup.hxx;h=90e6722afaa0bb2b5a4481a298ed6010019ae943;hb=ffd567ddfa3eae0e41303e5c462c3bbe66065e32;hp=69084c5b95771759860b8890f64baaedfcf96f9d;hpb=e4737e85f0da6d3f90fd08f6be1c2825195fe16f;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MeshGroup.hxx b/src/SMDS/SMDS_MeshGroup.hxx index 69084c5b9..90e6722af 100644 --- a/src/SMDS/SMDS_MeshGroup.hxx +++ b/src/SMDS/SMDS_MeshGroup.hxx @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org or email : webmaster@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -29,8 +29,19 @@ #include "SMDS_Mesh.hxx" #include +//#ifdef WNT +//#include +//#else +//#define SALOME_WNT_EXPORT +//#endif -class SMDS_MeshGroup:public SMDS_MeshObject +#if defined WNT && defined WIN32 && defined SMDS_EXPORTS +#define SMDS_WNT_EXPORT __declspec( dllexport ) +#else +#define SMDS_WNT_EXPORT +#endif + +class SMDS_WNT_EXPORT SMDS_MeshGroup:public SMDS_MeshObject { public: SMDS_MeshGroup(const SMDS_Mesh * theMesh, @@ -49,6 +60,8 @@ class SMDS_MeshGroup:public SMDS_MeshObject bool IsEmpty() const { return myElements.empty(); } int Extent() const { return myElements.size(); } + int SubGroupsNb() const { return myChildren.size(); } + SMDSAbs_ElementType GetType() const { return myType; } bool Contains(const SMDS_MeshElement * theElem) const; @@ -61,16 +74,27 @@ class SMDS_MeshGroup:public SMDS_MeshObject const SMDS_MeshElement* Next() const { return *(const_cast(myIterator))++; } + void InitSubGroupsIterator() const + { const_cast(myGroupIterator) = myChildren.begin(); } + + bool MoreSubGroups() const { return myGroupIterator != myChildren.end(); } + + const SMDS_MeshGroup* NextSubGroup() const + { return *(const_cast(myGroupIterator))++; } + private: SMDS_MeshGroup(SMDS_MeshGroup* theParent, const SMDSAbs_ElementType theType = SMDSAbs_All); - typedef std::set::iterator TIterator; + typedef std::set::const_iterator TIterator; + typedef std::list::const_iterator TGroupIterator; + const SMDS_Mesh * myMesh; SMDSAbs_ElementType myType; std::set myElements; SMDS_MeshGroup * myParent; std::list myChildren; TIterator myIterator; + TGroupIterator myGroupIterator; }; #endif