Salome HOME
Added the hasRootDocument method for GUI NewDocument checking
[modules/shaper.git] / src / Model / Model_PluginManager.h
index c0cc31e5f4232af4aecd1e076fa1d3d9d29d5eaa..8fc49bdf2c6e9ccb84c136360b34c33a91bd933b 100644 (file)
@@ -27,12 +27,12 @@ class Model_PluginManager : public ModelAPI_PluginManager, public Event_Listener
   std::string myCurrentPluginName; ///< name of the plugin that must be loaded currently
   std::shared_ptr<ModelAPI_Document> myCurrentDoc; ///< current working document
 public:
-  /// Creates the feature object using plugins functionality
-  MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID);
-
   /// Returns the root document of the application (that may contains sub-documents)
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> rootDocument();
 
+  /// Return true if root document has been already created
+  MODEL_EXPORT virtual bool hasRootDocument();
+
   /// Returns the current document that used for current work in the application
   MODEL_EXPORT virtual std::shared_ptr<ModelAPI_Document> currentDocument();
 
@@ -50,9 +50,12 @@ public:
   /// Is called only once, on startup of the application
   Model_PluginManager();
 
-private:
+protected:
   /// Loads (if not done yet) the information about the features and plugins
   void LoadPluginsInfo();
+
+  /// Creates the feature object using plugins functionality
+  virtual std::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID);
 };
 
 #endif