Salome HOME
High level objects history implementation for Intersection and Compound features...
[modules/shaper.git] / src / Model / Model_Session.h
index 89b9d548c1d5d1b1416b57dde0ad8ec9b92c1aa6..7b7afe2b585f72703359e20e3d4c0d9d3809b129 100644 (file)
@@ -44,6 +44,8 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
   std::map<std::string, ModelAPI_Plugin*> myPluginObjs;  ///< instances of the already plugins
   std::string myCurrentPluginName;  ///< name of the plugin that must be loaded currently
   std::shared_ptr<ModelAPI_Document> myCurrentDoc;  ///< current working document
+   ///< map from plugin id to plugins which are used by it (must be loaded before this one)
+  std::map<std::string, std::string> myUsePlugins;
 
   /// if true, generates error if document is updated outside of transaction
   bool myCheckTransactions;
@@ -142,6 +144,13 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
   /// Returns the global identifier of the current transaction (needed for the update algo)
   MODEL_EXPORT virtual int transactionID();
 
+
+  /// Returns true if auto-update in the application is blocked
+  MODEL_EXPORT virtual bool isAutoUpdateBlocked();
+
+  /// Set state of the auto-update of features result in the application
+  MODEL_EXPORT virtual void blockAutoUpdate(const bool theBlock);
+
  protected:
   /// Loads (if not done yet) the information about the features and plugins
   void LoadPluginsInfo();
@@ -149,6 +158,9 @@ class Model_Session : public ModelAPI_Session, public Events_Listener
   /// Creates the feature object using plugins functionality
   FeaturePtr createFeature(std::string theFeatureID, Model_Document* theDocOwner);
 
+  /// Get the plugin by name. If it is not loaded, load plugin.
+  ModelAPI_Plugin* getPlugin(const std::string& thePluginName);
+
   friend class Model_Document;
   friend class Model_Objects;
 };