Salome HOME
Update SketchPlugin_Projection feature (issue #1459)
[modules/shaper.git] / src / GeomAPI / GeomAPI_DataMapOfShapeShape.h
index 20b63903afe1b72998522857b96d60d7fcf4eaf4..2e11b8574831bc82f563262c7fde1a585429a2ba 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        GeomAPI_DataMapOfShapeShape.h
 // Created:     28 Oct 2014
 // Author:      Sergey Zaritchny
@@ -5,39 +7,55 @@
 #ifndef GeomAPI_DataMapOfShapeShape_H_
 #define GeomAPI_DataMapOfShapeShape_H_
 
-#include <boost/shared_ptr.hpp>
+#include <memory>
 #include <GeomAPI_Interface.h>
 
-class GeomAPI_Pnt;
-class GeomAPI_Dir;
+#include <GeomAPI_Shape.h>
 
 /**\class GeomAPI_DataMapOfShapeShape
  * \ingroup DataModel
  * \brief DataMap of Shape - Shape defined by TopoDS_Shapes
  */
-
-class GEOMAPI_EXPORT GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
+class GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
 {
  public:
-  /// Creation of plane by the point and normal
+  /// Constructor.
+  GEOMAPI_EXPORT
   GeomAPI_DataMapOfShapeShape();
 
-  /// Clear 
+  /// Clears map.
+  GEOMAPI_EXPORT
   void clear();
 
-  /// Adds the Key <K> to  the Map <me>  with  the  Item. Returns True  if the Key  was not already in the map
-  bool bind (boost::shared_ptr<GeomAPI_Shape> theKey, boost::shared_ptr<GeomAPI_Shape> theItem);
+  /// Size of the map.
+  GEOMAPI_EXPORT
+  int size();
+
+  /// Adds \a theKey to me with \a theItem. Returns True if the Key  was not already in the map.
+  GEOMAPI_EXPORT
+  bool bind (const std::shared_ptr<GeomAPI_Shape> theKey, const std::shared_ptr<GeomAPI_Shape> theItem);
+
+  /// Merges two maps.
+  GEOMAPI_EXPORT void merge(const GeomAPI_DataMapOfShapeShape& theDataMap);
+
+  /// Merges two maps.
+  GEOMAPI_EXPORT void merge(const std::shared_ptr<GeomAPI_DataMapOfShapeShape> theDataMap);
+
+  /// \return true if theKey is stored  in the map.
+  GEOMAPI_EXPORT
+  bool isBound (const std::shared_ptr<GeomAPI_Shape> theKey);
 
-  /// Returns true if theKey is stored  in the map.
-  bool isBound (boost::shared_ptr<GeomAPI_Shape> theKey);
+  /// \return the Item stored  with the Key in the Map.
+  GEOMAPI_EXPORT
+  const std::shared_ptr<GeomAPI_Shape> find(const std::shared_ptr<GeomAPI_Shape> theKey);
 
-  /// Returns  the Item stored  with the Key in the Map.
-  const boost::shared_ptr<GeomAPI_Shape> find(boost::shared_ptr<GeomAPI_Shape> theKey);  
-  
-  /// Removes the Key from the  map. Returns true if the Key was in the Map
-  bool unBind(boost::shared_ptr<GeomAPI_Shape> theKey);
+  /// \brief Removes the Key from the  map.
+  /// \return true if the Key was in the Map.
+  GEOMAPI_EXPORT
+  bool unBind(const std::shared_ptr<GeomAPI_Shape> theKey);
 
   /// Destructor
+  GEOMAPI_EXPORT
   ~GeomAPI_DataMapOfShapeShape();
 };