Salome HOME
#2027 Sketcher Trim Feature: correction of compilation on Linux
[modules/shaper.git] / src / Model / Model_Document.h
index 46ffb4c86feef45319ee2eab33c03db3605b56d0..639d84b0b572c84c30f2fea5de99b22699e14c92 100644 (file)
@@ -52,7 +52,8 @@ class Model_Document : public ModelAPI_Document
     const char* theDirName, const char* theFileName, std::list<std::string>& theResults);
 
   //! Removes document data
-  //! \param theForever if it is false, document is just hiden (to keep possibility make it back on Undo/Redo)
+  //! \param theForever if it is false, document is just hiden
+  //!                   (to keep possibility make it back on Undo/Redo)
   MODEL_EXPORT virtual void close(const bool theForever = false);
 
   //! Starts a new operation (opens a tansaction)
@@ -60,7 +61,7 @@ class Model_Document : public ModelAPI_Document
   //! Finishes the previously started operation (closes the transaction)
   //! \returns true if transaction in this document is not empty and really was performed
   MODEL_EXPORT virtual bool finishOperation();
-  //! Aborts the operation 
+  //! Aborts the operation
   MODEL_EXPORT virtual void abortOperation();
   //! Returns true if operation has been started, but not yet finished or aborted
   MODEL_EXPORT virtual bool isOperation() const;
@@ -149,7 +150,7 @@ class Model_Document : public ModelAPI_Document
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> internalFeature(const int theIndex);
   //! Performs synchronization of transactions with the module document:
   //! If some document is not active (by undo of activation) but in memory,
-  //! on activation the transactions must be synchronised because all redos performed 
+  //! on activation the transactions must be synchronised because all redos performed
   //! wihtout this participation
   MODEL_EXPORT virtual void synchronizeTransactions();
 
@@ -173,6 +174,9 @@ class Model_Document : public ModelAPI_Document
   /// Creates a group result
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultGroup> createGroup(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
+  /// Creates a field result
+  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultField> createField(
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
   /// Creates a parameter result
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_ResultParameter> createParameter(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0);
@@ -272,9 +276,21 @@ class Model_Document : public ModelAPI_Document
   //! Returns true if this document is currently active
   virtual bool isActive() const;
 
-  //! Returns the selection attribute that is used for calculation of selection externally from the document
+  //! Returns the selection attribute that is used
+  //! for calculation of selection externally from the document
   std::shared_ptr<ModelAPI_AttributeSelectionList> selectionInPartFeature();
 
+  /// Stores in the document boolean flags: states of the nodes in the object browser.
+  /// Normally is called outside of the transaction, just before "save".
+  virtual void storeNodesState(const std::list<bool>& theStates);
+
+  /// Returns the stored nodes states. Normally it is calles just after "open".
+  /// Appends the values to theStates list.
+  virtual void restoreNodesState(std::list<bool>& theStates) const;
+
+  /// Label that constains structures for selection of constructions of another document
+  TDF_Label extConstructionsLabel() const;
+
   friend class Model_Application;
   friend class Model_Session;
   friend class Model_Update;
@@ -285,6 +301,7 @@ class Model_Document : public ModelAPI_Document
   friend class Model_AttributeSelection;
   friend class Model_ResultPart;
   friend class Model_ResultCompSolid;
+  friend class Model_ResultConstruction;
   friend class Model_SelectionNaming;
   friend class DFBrowser;