Salome HOME
42c8a86d1329e631ef4c4cb3a595d34545a2dc62
[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 class GeomAPI_Pnt;
14 class GeomAPI_Dir;
15
16 /**\class GeomAPI_DataMapOfShapeShape
17  * \ingroup DataModel
18  * \brief DataMap of Shape - Shape defined by TopoDS_Shapes
19  */
20 class GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
21 {
22  public:
23   /// Creation of plane by the point and normal
24   GEOMAPI_EXPORT 
25   GeomAPI_DataMapOfShapeShape();
26
27   /// Clear 
28   GEOMAPI_EXPORT 
29   void clear();
30
31   /// Size of the map
32   GEOMAPI_EXPORT 
33   int size();
34
35   /// Adds \a theKey to me with \a theItem. Returns True if the Key  was not already in the map
36   GEOMAPI_EXPORT 
37   bool bind (std::shared_ptr<GeomAPI_Shape> theKey, std::shared_ptr<GeomAPI_Shape> theItem);
38
39   /// Merges two maps
40   GEOMAPI_EXPORT void merge(const GeomAPI_DataMapOfShapeShape& theDataMap);
41
42   /// Merges two maps
43   GEOMAPI_EXPORT void merge(const std::shared_ptr<GeomAPI_DataMapOfShapeShape> theDataMap);
44
45   /// Returns true if theKey is stored  in the map.
46   GEOMAPI_EXPORT 
47   bool isBound (std::shared_ptr<GeomAPI_Shape> theKey);
48
49   /// Returns  the Item stored  with the Key in the Map.
50   GEOMAPI_EXPORT 
51   const std::shared_ptr<GeomAPI_Shape> find(std::shared_ptr<GeomAPI_Shape> theKey);  
52   
53   /// Removes the Key from the  map. Returns true if the Key was in the Map
54   GEOMAPI_EXPORT 
55   bool unBind(std::shared_ptr<GeomAPI_Shape> theKey);
56
57   /// Destructor
58   GEOMAPI_EXPORT 
59   ~GeomAPI_DataMapOfShapeShape();
60 };
61
62 #endif
63