]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAPI/GeomAPI_DataMapOfShapeMapOfShapes.h
Salome HOME
Issue #1860: fix end lines with spaces
[modules/shaper.git] / src / GeomAPI / GeomAPI_DataMapOfShapeMapOfShapes.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_DataMapOfShapeMapOfShapes.h
4 // Created:     4 September 2015
5 // Author:      Dmitry Bobylev
6
7 #ifndef GeomAPI_DataMapOfShapeMapOfShapes_H_
8 #define GeomAPI_DataMapOfShapeMapOfShapes_H_
9
10 #include "GeomAPI_Interface.h"
11
12 #include "GeomAPI_Shape.h"
13
14 /// \class GeomAPI_DataMapOfShapeMapOfShapes
15 /// \ingroup DataModel
16 /// \brief DataMap of Shape - Map of Shapes defined by TopoDS_Shapes
17 class GeomAPI_DataMapOfShapeMapOfShapes : public GeomAPI_Interface
18 {
19 public:
20   /// Constructor.Creates empty map.
21   GEOMAPI_EXPORT GeomAPI_DataMapOfShapeMapOfShapes();
22
23   /// \brief Binds list of shapes to the key shape.
24   /// \param[in] theKey key shape.
25   /// \param[in] theItems list of shapes.
26   ///                     If shapes have duplications in list only one will be stored.
27   /// \returns true if items bound successfully.
28   GEOMAPI_EXPORT bool bind(const std::shared_ptr<GeomAPI_Shape> theKey,
29                            const ListOfShape& theItems);
30
31   /// \brief Adds item to the map bounded to the key.
32   /// \param[in] theKey key shape.
33   /// \param[in] theItem item shape.
34   /// \returns true if item bounded successfully. False if it is already bound.
35   GEOMAPI_EXPORT bool add(const std::shared_ptr<GeomAPI_Shape> theKey,
36                           const std::shared_ptr<GeomAPI_Shape> theItem);
37
38   /// \return true if theKey is stored  in the map.
39   GEOMAPI_EXPORT bool isBound(const std::shared_ptr<GeomAPI_Shape> theKey) const;
40
41   /// \return list of shapes bounded to theKey.
42   GEOMAPI_EXPORT bool find(const std::shared_ptr<GeomAPI_Shape> theKey,
43                            ListOfShape& theItems) const;
44
45   /// Undinds shapes from theKey.
46   GEOMAPI_EXPORT bool unBind(const std::shared_ptr<GeomAPI_Shape> theKey);
47
48   /// Clears map.
49   GEOMAPI_EXPORT void clear();
50
51   /// \return size of map.
52   GEOMAPI_EXPORT int size() const;
53 };
54
55 #endif