Salome HOME
Architecture changes
[modules/shaper.git] / src / GeomAPI / GeomAPI_DataMapOfShapeShape.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_DataMapOfShapeShape.h
4 // Created:     28 Oct 2014
5 // Author:      Sergey Zaritchny
6
7 #ifndef GeomAPI_DataMapOfShapeShape_H_
8 #define GeomAPI_DataMapOfShapeShape_H_
9
10 #include <memory>
11 #include <GeomAPI_Interface.h>
12
13 #include <GeomAPI_Shape.h>
14
15 /**\class GeomAPI_DataMapOfShapeShape
16  * \ingroup DataModel
17  * \brief DataMap of Shape - Shape defined by TopoDS_Shapes
18  */
19 class GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
20 {
21  public:
22   /// Constructor.
23   GEOMAPI_EXPORT
24   GeomAPI_DataMapOfShapeShape();
25
26   /// Clears map.
27   GEOMAPI_EXPORT
28   void clear();
29
30   /// Size of the map.
31   GEOMAPI_EXPORT
32   int size();
33
34   /// Adds \a theKey to me with \a theItem. Returns True if the Key  was not already in the map.
35   GEOMAPI_EXPORT
36   bool bind (const std::shared_ptr<GeomAPI_Shape> theKey, const std::shared_ptr<GeomAPI_Shape> theItem);
37
38   /// Merges two maps.
39   GEOMAPI_EXPORT void merge(const GeomAPI_DataMapOfShapeShape& theDataMap);
40
41   /// Merges two maps.
42   GEOMAPI_EXPORT void merge(const std::shared_ptr<GeomAPI_DataMapOfShapeShape> theDataMap);
43
44   /// \return true if theKey is stored  in the map.
45   GEOMAPI_EXPORT
46   bool isBound (const std::shared_ptr<GeomAPI_Shape> theKey);
47
48   /// \return the Item stored  with the Key in the Map.
49   GEOMAPI_EXPORT
50   const std::shared_ptr<GeomAPI_Shape> find(const std::shared_ptr<GeomAPI_Shape> theKey);
51
52   /// \brief Removes the Key from the  map.
53   /// \return true if the Key was in the Map.
54   GEOMAPI_EXPORT
55   bool unBind(const std::shared_ptr<GeomAPI_Shape> theKey);
56
57   /// Destructor
58   GEOMAPI_EXPORT
59   ~GeomAPI_DataMapOfShapeShape();
60 };
61
62 #endif
63