X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_Session.h;h=7b7afe2b585f72703359e20e3d4c0d9d3809b129;hb=b0196aeefbaa53754b1052fab904386707caad87;hp=89b9d548c1d5d1b1416b57dde0ad8ec9b92c1aa6;hpb=7b4be16ca6e44bd9fc8aaca8cda03646801adcd4;p=modules%2Fshaper.git diff --git a/src/Model/Model_Session.h b/src/Model/Model_Session.h index 89b9d548c..7b7afe2b5 100644 --- a/src/Model/Model_Session.h +++ b/src/Model/Model_Session.h @@ -44,6 +44,8 @@ class Model_Session : public ModelAPI_Session, public Events_Listener std::map myPluginObjs; ///< instances of the already plugins std::string myCurrentPluginName; ///< name of the plugin that must be loaded currently std::shared_ptr myCurrentDoc; ///< current working document + ///< map from plugin id to plugins which are used by it (must be loaded before this one) + std::map 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; };