1 // File: ModelAPI_Iterator.hxx
3 // Author: Mikhail PONIKAROV
5 #ifndef ModelAPI_Iterator_HeaderFile
6 #define ModelAPI_Iterator_HeaderFile
12 class ModelAPI_Feature;
13 class ModelAPI_Document;
15 /**\class ModelAPI_Iterator
17 * \brief Allows to iterate features of the document. Is created by the document
18 * (see method featuresIterator).
21 class MODELAPI_EXPORT ModelAPI_Iterator
24 /// Iterates to the next feature
25 virtual void next() = 0;
26 /// Returns true if the current iteration is valid and next iteration is possible
27 virtual bool more() = 0;
28 /// Returns the currently iterated feature
29 virtual std::shared_ptr<ModelAPI_Feature> current() = 0;
30 /// Returns the kind of the current feature (faster than Current()->getKind())
31 virtual std::string currentKind() = 0;
32 /// Returns the name of the current feature (faster than Current()->getName())
33 virtual std::string currentName() = 0;
34 /// Don't changes the current position of iterator. Not fast: iterates the left items.
35 /// \returns number of left iterations
36 virtual int numIterationsLeft() = 0;
39 /// Use plugin manager for features creation: this method is
40 /// defined here only for SWIG-wrapping