Salome HOME
Updates for stability of application
[modules/shaper.git] / src / Model / Model_PluginManager.h
index 7f405573fea644010a96dc6c53757e2be75b83af..4efef6a4cd5034c79e8ff69a405cc49b852ceb33 100644 (file)
@@ -26,6 +26,7 @@ class Model_PluginManager : public ModelAPI_PluginManager, public Events_Listene
   std::map<std::string, ModelAPI_Plugin*> myPluginObjs; ///< instances of the already plugins
   std::string myCurrentPluginName; ///< name of the plugin that must be loaded currently
   boost::shared_ptr<ModelAPI_Document> myCurrentDoc; ///< current working document
+  bool myCheckTransactions; ///< if true, generates error if document is updated outside of transaction
 public:
   /// Returns the root document of the application (that may contains sub-documents)
   MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> rootDocument();
@@ -47,6 +48,12 @@ public:
   /// Processes the configuration file reading
   MODEL_EXPORT virtual void processEvent(const Events_Message* theMessage);
 
+  /// Copies the document to the new one wit hthe given id
+  MODEL_EXPORT virtual boost::shared_ptr<ModelAPI_Document> copy(
+    boost::shared_ptr<ModelAPI_Document> theSource, std::string theID);
+
+  void setCheckTransactions(const bool theCheck) {myCheckTransactions = theCheck;}
+
   /// Is called only once, on startup of the application
   Model_PluginManager();