X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshGroup.hxx;h=90e6722afaa0bb2b5a4481a298ed6010019ae943;hp=ef2264c12f695c5776cce27251c88a38df5eb993;hb=104ff7b2818ce4d0f8a38d840abd3e5c70190668;hpb=090aff07266d376ae028ae43434bdea7c0a0f9bb diff --git a/src/SMDS/SMDS_MeshGroup.hxx b/src/SMDS/SMDS_MeshGroup.hxx index ef2264c12..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::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