Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / Model / Model_Document.h
index 75825586474b1dd93bef02be0455018c9a034273..ad309ce94ff6a117f647ae7a88d9bbc91ea625b7 100644 (file)
@@ -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<std::string>& subDocuments() const {return mySubs;}
+  const std::set<std::string> 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<std::string, TDF_Label> myNamingNames;
 
-  ///< set of identifiers of sub-documents of this document
-  std::set<std::string> mySubs;
   /// transaction indexes (related to myTransactionsAfterSave) which were empty in this doc
   std::map<int, bool> myIsEmptyTr;
   /// If it is true, features are not executed on update (on abort, undo, redo)