1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_ShapeIterator.h
4 // Created: 27 April 2016
5 // Author: Dmitry Bobylev
7 #ifndef GeomAPI_ShapeIterator_H_
8 #define GeomAPI_ShapeIterator_H_
11 #include "GeomAPI_Shape.h"
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
21 /// Default constructor. Creates an empty iterator, becomes usefull after Init.
22 GEOMAPI_EXPORT GeomAPI_ShapeIterator();
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);
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);
32 /// \return true if there is another sub-shape in the shape which this iterator is scanning.
33 GEOMAPI_EXPORT bool more() const;
35 /// Moves on to the next sub-shape in the shape which this iterator is scanning.
36 GEOMAPI_EXPORT void next();
38 /// \return the current sub-shape in the shape which this iterator is scanning.
39 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape> current();