X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModel%2FModel_Document.h;h=ad309ce94ff6a117f647ae7a88d9bbc91ea625b7;hb=33663043c7b20f1e284fca23778d83412f7e6e5c;hp=75825586474b1dd93bef02be0455018c9a034273;hpb=a07cdcdf600fc224bc862686439dfbe01d72524a;p=modules%2Fshaper.git diff --git a/src/Model/Model_Document.h b/src/Model/Model_Document.h index 758255864..ad309ce94 100644 --- a/src/Model/Model_Document.h +++ b/src/Model/Model_Document.h @@ -85,7 +85,7 @@ class Model_Document : public ModelAPI_Document //! Returns the existing feature by the label //! \param theLabel base label of the feature - MODEL_EXPORT virtual FeaturePtr feature(TDF_Label& theLabel); + MODEL_EXPORT virtual FeaturePtr feature(TDF_Label& theLabel) const; //! Returns the existing object: result or feature //! \param theLabel base label of the object @@ -140,11 +140,14 @@ class Model_Document : public ModelAPI_Document void addNamingName(const TDF_Label theLabel, std::string theName); //! Returns the label, keeper of the name for the topological naming needs TDF_Label findNamingName(std::string theName); + //! Returns the result by name of the result (names of results must be unique, used for naming + //! selection by name. + ResultPtr findByName(const std::string theName); protected: //! Returns (creates if needed) the features label - TDF_Label featuresLabel(); + TDF_Label featuresLabel() const; //! Initializes feature with a unique name in this group (unique name is generated as //! feature type + "_" + index @@ -184,7 +187,7 @@ class Model_Document : public ModelAPI_Document void updateResults(FeaturePtr theFeature); //! Returns all sub documents - const std::set& subDocuments() const {return mySubs;} + const std::set subDocuments(const bool theActivatedOnly) const; friend class Model_Application; friend class Model_Session; @@ -208,8 +211,6 @@ class Model_Document : public ModelAPI_Document /// Optimization for finding the shape-label by topological naming names std::map myNamingNames; - ///< set of identifiers of sub-documents of this document - std::set mySubs; /// transaction indexes (related to myTransactionsAfterSave) which were empty in this doc std::map myIsEmptyTr; /// If it is true, features are not executed on update (on abort, undo, redo)