Salome HOME
Merge remote-tracking branch 'remotes/origin/HigherLevelObjectsHistory'
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultBody.h
index 0304b86c5e07efe9a8ce44a9168447c9de0f047a..0991119bd56c931ed13a666172efc1fe8e2ed15d 100644 (file)
@@ -101,11 +101,21 @@ public:
   MODELAPI_EXPORT virtual void storeGenerated(const GeomShapePtr& theFromShape,
                                               const GeomShapePtr& theToShape);
 
+  /// Stores the root modified shapes (called by the execution method).
+  MODELAPI_EXPORT virtual void storeGenerated(
+    const std::list<GeomShapePtr>& theFromShapes, const GeomShapePtr& theToShape,
+    const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape);
+
   /// Stores the modified shape (called by the execution method).
   MODELAPI_EXPORT virtual void storeModified(const GeomShapePtr& theOldShape,
                                              const GeomShapePtr& theNewShape,
                                              const bool theIsCleanStored = true);
 
+  /// Stores the root modified shapes (called by the execution method).
+  MODELAPI_EXPORT virtual void storeModified(
+    const std::list<GeomShapePtr>& theOldShapes, const GeomShapePtr& theNewShape,
+    const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape);
+
   /// Returns the shape-result produced by this feature
   MODELAPI_EXPORT virtual GeomShapePtr shape();
 
@@ -147,7 +157,8 @@ public:
   virtual void loadGeneratedShapes(const std::shared_ptr<GeomAlgoAPI_MakeShape>& theAlgo,
                                    const GeomShapePtr& theOldShape,
                                    const GeomAPI_Shape::ShapeType theShapeTypeToExplore,
-                                   const std::string& theName = "") = 0;
+                                   const std::string& theName = "",
+                                   const bool theSaveOldIfNotInTree = false) = 0;
 
   /// load shapes of the first level (to be used during shape import)
   MODELAPI_EXPORT virtual void loadFirstLevel(GeomShapePtr theShape,
@@ -164,6 +175,11 @@ public:
   MODELAPI_EXPORT virtual void updateSubs(const GeomShapePtr& theThisShape,
     const bool theShapeChanged = true) = 0;
 
+  /// Updates the sub-bodies in accordance to the algorithm history information
+  MODELAPI_EXPORT virtual void updateSubs(
+    const GeomShapePtr& theThisShape, const std::list<GeomShapePtr>& theOlds,
+    const std::shared_ptr<GeomAlgoAPI_MakeShape> theMakeShape, const bool isGenerated) = 0;
+
   /// Cleans cash related to the already stored elements
   MODELAPI_EXPORT virtual void cleanCash() = 0;