Salome HOME
Merge branch 'V8_2_BR'
[modules/gui.git] / src / SUIT / SUIT_DataObjectIterator.h
index 91b3f5350b03d2bf4d18b206831c4446a1a094d1..19baaafb493c554636a4ebcdb29c6aea3e9a0f52 100644 (file)
@@ -1,10 +1,35 @@
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// 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.com
+//
+
 #ifndef SUIT_DATAOBJECT_ITERATOR_H
 #define SUIT_DATAOBJECT_ITERATOR_H
 
 #include "SUIT_DataObject.h"
 
 /*!
-  Class provide data object iterator.
+  \class SUIT_DataObjectIterator
+  Provides functionality of SUIT tree detour
+  It is possible to use "to-depth" or "to-breadth" detour and
+  to control level detour (from left or from right)
 */
 class SUIT_EXPORT SUIT_DataObjectIterator
 {
@@ -30,9 +55,16 @@ protected:
 
 private:
   SUIT_DataObject*  myExtremeChild;
-  int               myDetourType, myCurrentLevel;
+  int               myDetourType;
+  ///! Indexes of the iterated children at each level (optimization for avoid indexOf call)
+  QList<int>        myChildrenIndexes;
 };
 
+/*!
+  \class SUIT_DataObjectIterator
+  Provides functionality of SUIT tree detour between certain levels 
+  Only "to-breadth" detour is used
+*/
 class SUIT_DataObjectLevelIterator : public SUIT_DataObjectIterator
 {
 public: