Salome HOME
Features and plugins loading mechanisms
[modules/shaper.git] / src / ModelAPI / ModelAPI_PluginManager.h
index c4033c3b1dcba53ba8229eb482ccc76156f6fb6c..620501bfd07e97d18d1cbf8dc82236ba6a5fafce 100644 (file)
@@ -10,6 +10,7 @@
 #include <boost/shared_ptr.hpp>
 
 class ModelAPI_Feature;
+class ModelAPI_Plugin;
 
 /**\class ModelAPI_PluginManager
  * \ingroup DataModel
@@ -22,10 +23,18 @@ class MODELAPI_EXPORT ModelAPI_PluginManager
 {
 public:
   /// Creates the feature object using plugins functionality
-  virtual boost::shared_ptr<ModelAPI_Feature> CreateFeature(std::string theFeatureID) = 0;
+  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 boost::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 
+  /// the plugin manager on call of the feature)
+  virtual void registerPlugin(ModelAPI_Plugin* thePlugin) = 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);
 
   /// Is needed for python wrapping by swig, call Get to get an instance
   ModelAPI_PluginManager();