Salome HOME
Fix for the issue #2903 : Crash when creating a group on all faces
[modules/shaper.git] / src / Model / Model_ResultBody.h
index a810f2ea0fd0a9bdd5a5e100bad014f1a3b91c96..8abd4408965588dccb07a882fdb07258f53156ca 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef Model_ResultBody_H_
@@ -26,6 +25,8 @@
 #include <vector>
 #include <map>
 
+#include <TopTools_DataMapOfShapeListOfShape.hxx>
+
 /**\class Model_ResultBody
 * \ingroup DataModel
 * \brief The body (shape) result of a feature.
@@ -49,6 +50,8 @@ class Model_ResultBody : public ModelAPI_ResultBody
   std::list<GeomShapePtr> myOlds;
   /// Information about the kind of the history information: modified or generated
   bool myIsGenerated;
+  /// Map from old shape to list of new shapes, cash for computeOldForSub method
+  TopTools_DataMapOfShapeListOfShape myHistoryCash;
 
 public:
 
@@ -65,7 +68,8 @@ public:
   virtual void loadGeneratedShapes(const std::shared_ptr<GeomAlgoAPI_MakeShape>& theAlgo,
                                    const GeomShapePtr& theOldShape,
                                    const GeomAPI_Shape::ShapeType theShapeTypeToExplore,
-                                   const std::string& theName = "") override;
+                                   const std::string& theName = "",
+                                   const bool theSaveOldIfNotInTree = false) override;
 
   /// load modified shapes for sub-objects
   MODEL_EXPORT