X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_ResultBody.h;h=7b9b3177871ffff939626c90df9b938758e107bf;hb=d5c7ad3c50f89a2ddc2de1866ffb7f09397f3be2;hp=0304b86c5e07efe9a8ce44a9168447c9de0f047a;hpb=97917d3698f5a2f7fc9596e7c755ff8f6751e373;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_ResultBody.h b/src/ModelAPI/ModelAPI_ResultBody.h index 0304b86c5..7b9b31778 100644 --- a/src/ModelAPI/ModelAPI_ResultBody.h +++ b/src/ModelAPI/ModelAPI_ResultBody.h @@ -86,9 +86,9 @@ public: MODELAPI_EXPORT virtual std::shared_ptr subResult( const int theIndex, bool forTree = false) const = 0; - /// Returns true if feature or result belong to this composite feature as subs + /// Returns true if theResult belong to this composite result as sub. /// Returns theIndex - zero based index of sub if found - MODELAPI_EXPORT virtual bool isSub(ObjectPtr theObject, int& theIndex) const = 0; + MODELAPI_EXPORT virtual bool isSub(ObjectPtr theResult, int& theIndex) const = 0; /// \brief Stores the shape (called by the execution method). /// param[in] theShape shape to store. @@ -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& theFromShapes, const GeomShapePtr& theToShape, + const std::shared_ptr 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& theOldShapes, const GeomShapePtr& theNewShape, + const std::shared_ptr theMakeShape); + /// Returns the shape-result produced by this feature MODELAPI_EXPORT virtual GeomShapePtr shape(); @@ -147,11 +157,12 @@ public: virtual void loadGeneratedShapes(const std::shared_ptr& 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, - const std::string& theName); + const std::string& theName) = 0; /// Returns true is the topology is connected. MODELAPI_EXPORT virtual bool isConnectedTopology() = 0; @@ -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& theOlds, + const std::shared_ptr theMakeShape, const bool isGenerated) = 0; + /// Cleans cash related to the already stored elements MODELAPI_EXPORT virtual void cleanCash() = 0;