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,
17 /// to its component sub-shapes. Each component shape is returned as a GeomAPI_Shape with
18 /// an orientation, and a compound of the original values and the relative values.
19 class GeomAPI_ShapeIterator : public GeomAPI_Interface
22 /// Default constructor. Creates an empty iterator, becomes usefull after Init.
23 GEOMAPI_EXPORT GeomAPI_ShapeIterator();
25 /// \brief Creates an iterator on theShape sub-shapes.
26 /// \param[in] theShape shape to iterate.
27 GEOMAPI_EXPORT GeomAPI_ShapeIterator(const std::shared_ptr<GeomAPI_Shape> theShape);
29 /// \brief Initializes this iterator with theShape.
30 /// \param[in] theShape shape to iterate.
31 GEOMAPI_EXPORT void init(const std::shared_ptr<GeomAPI_Shape> theShape);
33 /// \return true if there is another sub-shape in the shape which this iterator is scanning.
34 GEOMAPI_EXPORT bool more() const;
36 /// Moves on to the next sub-shape in the shape which this iterator is scanning.
37 GEOMAPI_EXPORT void next();
39 /// \return the current sub-shape in the shape which this iterator is scanning.
40 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape> current();