X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Objects.h;h=0b11f4436c05ddf72e05ab68487086bc7e5177e6;hb=853e0eec6016120b641efa6adf427a239cf203cf;hp=cd7f440e75a95f065045ebc982e410372ab86bcf;hpb=9ac4a898909782c5b6df52fcee4270247db31e45;p=modules%2Fshaper.git diff --git a/src/Model/Model_Objects.h b/src/Model/Model_Objects.h index cd7f440e7..0b11f4436 100644 --- a/src/Model/Model_Objects.h +++ b/src/Model/Model_Objects.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +52,9 @@ class Model_Objects //! \param theFeature a removed feature void removeFeature(FeaturePtr theFeature); + //! Moves the feature to make it after the given one in the history. + void moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis); + //! Returns the existing feature by the label //! \param theLabel base label of the feature FeaturePtr feature(TDF_Label theLabel) const; @@ -86,7 +90,12 @@ class Model_Objects ///! Returns all (and disabled) results of the given type. Not fast method (iterates all features). void allResults(const std::string& theGroupID, std::list& theResults); - /// Creates a construction cresults + //! Returns the number of all features: in the history or not + int numInternalFeatures(); + //! Returns the feature by zero-based index: features in the history or not + std::shared_ptr internalFeature(const int theIndex); + + /// Creates a construction results std::shared_ptr createConstruction( const std::shared_ptr& theFeatureData, const int theIndex = 0); /// Creates a body results @@ -95,6 +104,10 @@ class Model_Objects /// Creates a part results std::shared_ptr createPart( const std::shared_ptr& theFeatureData, const int theIndex = 0); + /// Copies a part results, keeping the reference to origin + std::shared_ptr copyPart( + const std::shared_ptr& theOrigin, + const std::shared_ptr& theFeatureData, const int theIndex = 0); /// Creates a group results std::shared_ptr createGroup( const std::shared_ptr& theFeatureData, const int theIndex = 0); @@ -125,10 +138,10 @@ class Model_Objects void setUniqueName(FeaturePtr theFeature); //! Synchronizes myFeatures list with the updated document - //! \param theMarkUpdated causes the "update" event for all features + //! \param theUpdated list of labels that are marked as modified, so featrues must be also //! \param theUpdateReferences causes the update of back-references //! \param theFlush makes flush all events in the end of all modifications of this method - void synchronizeFeatures(const bool theMarkUpdated, const bool theUpdateReferences, + void synchronizeFeatures(const TDF_LabelList& theUpdated, const bool theUpdateReferences, const bool theFlush); //! Synchronizes the BackReferences list in Data of Features and Results void synchronizeBackRefs(); @@ -169,6 +182,8 @@ class Model_Objects FeaturePtr firstFeature(); /// Returns to the last (from the history point of view) feature, any: invisible or disabled FeaturePtr lastFeature(); + /// Returns true if theLater is in history of features creation later than theCurrent + bool isLater(FeaturePtr theLater, FeaturePtr theCurrent) const; /// Returns the result group identifier of the given feature (for this at least one result must /// be created before)