Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / Model / Model_Iterator.h
index 2ec50ab3af0491c9a8cbe252bd23d0dc2c2aab89..5d8c61baec0c7a8fbb413d1e6a414c04da3d0ecb 100644 (file)
@@ -18,23 +18,32 @@ class Model_Document;
  * (see method featuresIterator).
  */
 
-class MODEL_EXPORT Model_Iterator : public ModelAPI_Iterator
+class Model_Iterator : public ModelAPI_Iterator
 {
   std::shared_ptr<Model_Document> myDoc; ///< the document of iterated objects
   TDF_ChildIDIterator myIter; ///< iterator of the features-labels
 public:
   /// Iterates to the next feature
-  virtual void Next();
+  MODEL_EXPORT virtual void next();
   /// Returns true if the current iteration is valid and next iteration is possible
-  virtual bool More();
+  MODEL_EXPORT virtual bool more();
   /// Returns the currently iterated feature
-  virtual std::shared_ptr<ModelAPI_Feature> Current();
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> current();
   /// Returns the kind of the current feature (faster than Current()->getKind())
-  virtual std::string CurrentKind();
+  MODEL_EXPORT virtual std::string currentKind();
   /// Returns the name of the current feature (faster than Current()->getName())
-  virtual std::string CurrentName();
+  MODEL_EXPORT virtual std::string currentName();
+  /// Don't changes the current position of iterator. Not fast: iterates the left items.
+  /// \returns number of left iterations
+  MODEL_EXPORT virtual int numIterationsLeft();
+
+  /// Compares the current feature with the given one
+  /// \returns true if given feature equals to the current one
+  MODEL_EXPORT virtual bool isEqual(std::shared_ptr<ModelAPI_Feature> theFeature);
 
 protected:
+  /// Creates an empty iterator that alway returns More false
+  Model_Iterator();
   /// Initializes iterator
   /// \param theDoc document where the iteration is performed
   /// \param theLab label of the features group to iterate