Salome HOME
Merge branch 'master' of newgeom:newgeom.git
[modules/shaper.git] / src / ModelAPI / ModelAPI_PluginManager.h
index a7b0c7bcd769895137a649fc16d3874b734123f1..3250bea97894ae162f2266645a16dbbd2ad47c6c 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "ModelAPI.h"
 #include <string>
-#include <boost/shared_ptr.hpp>
+#include <memory>
 
 class ModelAPI_Feature;
 class ModelAPI_Plugin;
@@ -23,11 +23,8 @@ class ModelAPI_Document;
 class MODELAPI_EXPORT ModelAPI_PluginManager
 {
 public:
-  /// Creates the feature object using plugins functionality
-  virtual boost::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID) = 0;
-
   /// Returns the real implementation (the alone instance per application) of the plugin manager
-  static boost::shared_ptr<ModelAPI_PluginManager> get();
+  static std::shared_ptr<ModelAPI_PluginManager> get();
 
   /// Registers the plugin that creates features.
   /// It is obligatory for each plugin to call this function on loading to be found by 
@@ -35,7 +32,13 @@ public:
   virtual void registerPlugin(ModelAPI_Plugin* thePlugin) = 0;
 
   /// Returns the root document of the application (that may contains sub-documents)
-  virtual boost::shared_ptr<ModelAPI_Document> rootDocument() = 0;
+  virtual std::shared_ptr<ModelAPI_Document> rootDocument() = 0;
+
+  /// Returns the current document that used for current work in the application
+  virtual std::shared_ptr<ModelAPI_Document> currentDocument() = 0;
+
+  /// Defines the current document that used for current work in the application
+  virtual void setCurrentDocument(std::shared_ptr<ModelAPI_Document> theDoc) = 0;
 
   /// loads the library with specific name, appends "lib*.dll" or "*.so" depending on the platform
   static void ModelAPI_PluginManager::loadLibrary(const std::string theLibName);
@@ -44,7 +47,12 @@ public:
   ModelAPI_PluginManager();
 
 protected:
-  static void SetPluginManager(boost::shared_ptr<ModelAPI_PluginManager> theManager);
+  /// Creates the feature object using plugins functionality
+  virtual std::shared_ptr<ModelAPI_Feature> createFeature(std::string theFeatureID) = 0;
+
+  static void SetPluginManager(std::shared_ptr<ModelAPI_PluginManager> theManager);
+
+  friend class Model_Document;
 };
 
 #endif