Salome HOME
Temporary comment (somehow inform the user about the scale of the view: line lenght...
[modules/shaper.git] / src / GeomAPI / GeomAPI_ShapeIterator.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_ShapeIterator.h
4 // Created:     27 April 2016
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAPI_ShapeIterator_H_
8 #define GeomAPI_ShapeIterator_H_
9
10 #include "GeomAPI.h"
11 #include "GeomAPI_Shape.h"
12
13 /// \class GeomAPI_ShapeIterator
14 /// \ingroup DataModel
15 /// \brief Iterates on the underlying shape underlying a given GeomAPI_Shape object, providing access
16 ///        to its component sub-shapes. Each component shape is returned as a GeomAPI_Shape with
17 ///        an orientation, and a compound of the original values and the relative values.
18 class GeomAPI_ShapeIterator : public GeomAPI_Interface
19 {
20 public:
21   /// Default constructor. Creates an empty iterator, becomes usefull after Init.
22   GEOMAPI_EXPORT GeomAPI_ShapeIterator();
23
24   /// \brief Creates an iterator on theShape sub-shapes.
25   /// \param[in] theShape shape to iterate.
26   GEOMAPI_EXPORT GeomAPI_ShapeIterator(const std::shared_ptr<GeomAPI_Shape> theShape);
27
28   /// \brief Initializes this iterator with theShape.
29   /// \param[in] theShape shape to iterate.
30   GEOMAPI_EXPORT void init(const std::shared_ptr<GeomAPI_Shape> theShape);
31
32   /// \return  true if there is another sub-shape in the shape which this iterator is scanning.
33   GEOMAPI_EXPORT bool more() const;
34
35   /// Moves on to the next sub-shape in the shape which this iterator is scanning.
36   GEOMAPI_EXPORT void next();
37
38   /// \return the current sub-shape in the shape which this iterator is scanning.
39   GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape> current();
40 };
41
42 #endif