Salome HOME
Changing ".hxx" to ".h" headers files extensions
[modules/shaper.git] / src / ModelAPI / ModelAPI_PluginManager.h
1 // File:        ModelAPI_PluginManager.hxx
2 // Created:     20 Mar 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ModelAPI_PluginManager_HeaderFile
6 #define ModelAPI_PluginManager_HeaderFile
7
8 #include "ModelAPI.h"
9 #include <string>
10 #include <boost/shared_ptr.hpp>
11
12 class ModelAPI_Feature;
13
14 /**\class ModelAPI_PluginManager
15  * \ingroup DataModel
16  * \brief Object that knows (from the initial XML file) which
17  * plugin contains which feature, loads and stores reference to loaded plugins by
18  * the feature functionality request.
19  */
20
21 class MODELAPI_EXPORT ModelAPI_PluginManager
22 {
23 public:
24   /// Creates the feature object using plugins functionality
25   virtual boost::shared_ptr<ModelAPI_Feature> CreateFeature(std::string theFeatureID) = 0;
26
27   /// Returns the real implementation (the alone instance per application) of the plugin manager
28   static boost::shared_ptr<ModelAPI_PluginManager> Get();
29
30   /// Is needed for python wrapping by swig, call Get to get an instance
31   ModelAPI_PluginManager();
32
33 protected:
34   static void SetPluginManager(boost::shared_ptr<ModelAPI_PluginManager> theManager);
35 };
36
37 #endif