Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/smesh.git] / src / SMESHDS / SMESHDS_Group.hxx
index 444914ceeeac211db88ca94e0efae8167d6e0b27..b318a0f97d8ad9bac37cb9b3a8d01ee019c5c4a4 100644 (file)
 //
 //
 //  File   : SMESHDS_Group.hxx
-//  Author : Michael Sazonov (OCC)
 //  Module : SMESH
 //  $Header$
 
 #ifndef _SMESHDS_Group_HeaderFile
 #define _SMESHDS_Group_HeaderFile
 
-#include <SMDS_MeshGroup.hxx>
 #include <string>
+#include "SMESHDS_GroupBase.hxx"
+#include "SMDS_MeshGroup.hxx"
 
 class SMESHDS_Mesh;
 
-class SMESHDS_Group : public SMDS_MeshGroup
+class SMESHDS_Group : public SMESHDS_GroupBase
 {
  public:
 
-  SMESHDS_Group (const SMESHDS_Mesh*       theMesh,
+  SMESHDS_Group (const int                 theID,
+                 const SMESHDS_Mesh*       theMesh,
                  const SMDSAbs_ElementType theType);
 
-  void SetStoreName (const char* theName)
-  { myStoreName = theName; }
+  virtual void SetType(SMDSAbs_ElementType theType);
 
-  const char* GetStoreName () const
-  { return myStoreName.c_str(); }
+  virtual int Extent();
 
-  bool Contains (const int theID) const;
+  virtual bool IsEmpty();
 
-  bool Add (const int theID);
-  bool Remove (const int theID);
+  virtual bool Contains (const int theID);
 
-  int GetID (const int theIndex);
-  // use it for iterations 1..Extent() as alternative to parent's
-  // InitIterator(), More(), Next()
+  virtual SMDS_ElemIteratorPtr GetElements();
 
- private:
-  SMESHDS_Group (const SMESHDS_Group& theOther);
-  // prohibited copy constructor
-  SMESHDS_Group& operator = (const SMESHDS_Group& theOther);
-  // prohibited assign operator
+  bool SMESHDS_Group::Add (const int theID);
+
+  bool SMESHDS_Group::Remove (const int theID);
+
+  void Clear();
 
-  const SMDS_MeshElement* findInMesh (const int theID) const;
+  SMDS_MeshGroup& SMDSGroup() { return myGroup; }
+
+ private:
 
-  string myStoreName;
-  int    myCurIndex;
-  int    myCurID;
+  SMDS_MeshGroup myGroup;
 
 };