X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_PluginManager.h;h=47c42562ffdcd87682973ccdd152d595593a0290;hb=5dfed65281f80488610fa9817350611277c6b0aa;hp=8aab3f6f40d8525510612b61cad659634794ed61;hpb=0e2657c401cfc2297fba4f1d799eaf14da193318;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_PluginManager.h b/src/ModelAPI/ModelAPI_PluginManager.h index 8aab3f6f4..47c42562f 100644 --- a/src/ModelAPI/ModelAPI_PluginManager.h +++ b/src/ModelAPI/ModelAPI_PluginManager.h @@ -7,7 +7,7 @@ #include "ModelAPI.h" #include -#include +#include class ModelAPI_Feature; class ModelAPI_Plugin; @@ -24,7 +24,7 @@ class MODELAPI_EXPORT ModelAPI_PluginManager { public: /// Returns the real implementation (the alone instance per application) of the plugin manager - static std::shared_ptr get(); + static boost::shared_ptr get(); /// Registers the plugin that creates features. /// It is obligatory for each plugin to call this function on loading to be found by @@ -32,16 +32,16 @@ public: virtual void registerPlugin(ModelAPI_Plugin* thePlugin) = 0; /// Returns the root document of the application (that may contains sub-documents) - virtual std::shared_ptr rootDocument() = 0; + virtual boost::shared_ptr rootDocument() = 0; + + /// Return true if root document has been already created + virtual bool hasRootDocument() = 0; /// Returns the current document that used for current work in the application - virtual std::shared_ptr currentDocument() = 0; + virtual boost::shared_ptr currentDocument() = 0; /// Defines the current document that used for current work in the application - virtual void setCurrentDocument(std::shared_ptr 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); + virtual void setCurrentDocument(boost::shared_ptr theDoc) = 0; /// Is needed for python wrapping by swig, call Get to get an instance ModelAPI_PluginManager(); @@ -51,11 +51,14 @@ public: protected: /// Creates the feature object using plugins functionality - virtual std::shared_ptr createFeature(std::string theFeatureID) = 0; + virtual boost::shared_ptr createFeature(std::string theFeatureID) = 0; - static void SetPluginManager(std::shared_ptr theManager); + static void SetPluginManager(boost::shared_ptr theManager); friend class Model_Document; }; +typedef boost::shared_ptr PluginManagerPtr; + + #endif