Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/smesh.git] / src / SMESHDS / SMESHDS_GroupBase.cxx
index c3fc31d7017c8df8c942e5fd963687665910caba..52b21e168e21262a413d0dc3fb1b07dfd90f2e2c 100644 (file)
@@ -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.salome-platform.org or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -41,7 +41,7 @@ SMESHDS_GroupBase::SMESHDS_GroupBase (const int                 theID,
                                       const SMESHDS_Mesh*       theMesh,
                                       const SMDSAbs_ElementType theType):
        myID(theID), myMesh(theMesh), myType(theType), myStoreName(""),
-       myCurIndex(0), myCurID(0)
+       myCurIndex(0), myCurID(-1)
 {
 }
 
@@ -86,6 +86,18 @@ const SMDS_MeshElement* SMESHDS_GroupBase::findInMesh (const int theID) const
   return aElem;
 }
 
+//=============================================================================
+/*!
+ *  Internal method: resets cached iterator, should be called by ancestors
+ *  when they are modified (ex: Add() or Remove() )
+ */
+//=============================================================================
+void SMESHDS_GroupBase::resetIterator()
+{
+  myCurIndex = 0;
+  myCurID = -1;
+}
+
 //=======================================================================
 //function : Extent
 //purpose  :