]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelAPI/ModelAPI_Document.h
Salome HOME
Add tools
[modules/shaper.git] / src / ModelAPI / ModelAPI_Document.h
index 719fff08ceafab1c362e26c8ebb28d7ce7dd25ec..a56fd64bf35e26934296f056872095335dca0522 100644 (file)
@@ -7,7 +7,9 @@
 #ifndef ModelAPI_Document_H_
 #define ModelAPI_Document_H_
 
-#include <ModelAPI.h>
+#include "ModelAPI.h"
+#include "ModelAPI_Entity.h"
+
 #include <string>
 #include <memory>
 #include <vector>
@@ -19,7 +21,6 @@ class ModelAPI_Object;
 class ModelAPI_Result;
 class ModelAPI_ResultConstruction;
 class ModelAPI_ResultBody;
-class ModelAPI_ResultCompSolid;
 class ModelAPI_ResultPart;
 class ModelAPI_ResultGroup;
 class ModelAPI_ResultParameter;
@@ -31,7 +32,7 @@ class ModelAPI_Data;
  * Document contains all data that must be stored/retrived in the file.
  * Also it provides acces to this data: open/save, transactions management etc.
  */
-class ModelAPI_Document
+class ModelAPI_Document: public ModelAPI_Entity
 {
 public:
   //! Returns the kind of the document: "PartSet", "Part", or something else.
@@ -102,8 +103,9 @@ public:
   //! will be appended after this one.
   //! \param theCurrent the selected feature as current: blow it everythin become disabled
   //! \param theVisible use visible features only: flag is true for Object Browser functionality
+  //! \param theFlushUpdates if it is true (default) it flashes creation/redisplay/delete messages
   virtual void setCurrentFeature(std::shared_ptr<ModelAPI_Feature> theCurrent,
-    const bool theVisible) = 0;
+    const bool theVisible, const bool theFlushUpdates = true) = 0;
   //! Makes the current feature one feature upper
   virtual void setCurrentFeatureUp() = 0;
 
@@ -111,32 +113,33 @@ public:
   virtual int numInternalFeatures() = 0;
   //! Returns the feature by zero-based index: features in the history or not
   virtual std::shared_ptr<ModelAPI_Feature> internalFeature(const int theIndex) = 0;
+  //! 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 
+  //! wihtout this participation
+  virtual void synchronizeTransactions() = 0;
 
 
   //! To virtually destroy the fields of successors
   MODELAPI_EXPORT virtual ~ModelAPI_Document();
 
-  //! Creates a construction cresults
+  //! Creates a construction result
   virtual std::shared_ptr<ModelAPI_ResultConstruction> createConstruction(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
-  //! Creates a body results
+  //! Creates a body result
   virtual std::shared_ptr<ModelAPI_ResultBody> createBody(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
-  /// Creates a compsolid results
-  virtual std::shared_ptr<ModelAPI_ResultCompSolid> createCompSolid(
-      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
-  //! Creates a part results
+  //! Creates a part result
   virtual std::shared_ptr<ModelAPI_ResultPart> createPart(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
-  //! Copies a part result, keeping the same data
+  //! Copies a part result, keeping the reference to the origin
   virtual std::shared_ptr<ModelAPI_ResultPart> copyPart(
-      const std::shared_ptr<ModelAPI_Result>& theOldPart, 
-      const std::shared_ptr<ModelAPI_ResultPart>& theOrigin, 
-      const int theIndex = 0) = 0;
-  //! Creates a group results
+      const std::shared_ptr<ModelAPI_ResultPart>& theOrigin,
+      const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
+  //! Creates a group result
   virtual std::shared_ptr<ModelAPI_ResultGroup> createGroup(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;
-
+  //! Creates a parameter result
   virtual std::shared_ptr<ModelAPI_ResultParameter> createParameter(
       const std::shared_ptr<ModelAPI_Data>& theFeatureData, const int theIndex = 0) = 0;