+
+//======================================================================
+//function : Clear
+//purpose :
+//=======================================================================
+
+void SMESHDS_Group::Clear()
+{
+ myGroup.Clear();
+ resetIterator();
+}
+
+// =====================
+// class MyGroupIterator
+// =====================
+
+class MyGroupIterator: public SMDS_ElemIterator
+{
+ const SMDS_MeshGroup& myGroup;
+ public:
+ MyGroupIterator(const SMDS_MeshGroup& group): myGroup(group) { myGroup.InitIterator(); }
+ bool more() { return myGroup.More(); }
+ const SMDS_MeshElement* next() { return myGroup.Next(); }
+};
+
+//=======================================================================
+//function : GetElements
+//purpose :
+//=======================================================================
+
+SMDS_ElemIteratorPtr SMESHDS_Group::GetElements() const
+{
+ return SMDS_ElemIteratorPtr( new MyGroupIterator ( myGroup ));
+}
+
+//================================================================================