1 // File: ModelAPI_PluginManager.hxx
2 // Created: 20 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #include <ModelAPI_PluginManager.h>
6 // to avoid unresolved ModelAPI_Document()
7 #include <ModelAPI_Document.h>
8 // to avoid unresolved ModelAPI_Feature()
9 #include <ModelAPI_Feature.h>
10 // to avoid unresolved ModelAPI_Data()
11 #include <ModelAPI_Data.h>
12 // to avoid unresolved ModelAPI_Plugin()
13 #include <ModelAPI_Plugin.h>
14 #include <ModelAPI_Attribute.h>
15 #include <ModelAPI_AttributeDocRef.h>
16 #include <ModelAPI_AttributeDouble.h>
17 #include <ModelAPI_AttributeReference.h>
18 #include <ModelAPI_AttributeRefAttr.h>
19 #include <ModelAPI_AttributeRefList.h>
21 #include <Config_ModuleReader.h>
35 /// Manager that will be initialized from Model package, one per application
36 boost::shared_ptr<ModelAPI_PluginManager> MY_MANAGER;
38 ModelAPI_PluginManager::ModelAPI_PluginManager()
42 void ModelAPI_PluginManager::SetPluginManager(
43 boost::shared_ptr<ModelAPI_PluginManager> theManager)
45 MY_MANAGER = theManager;
48 boost::shared_ptr<ModelAPI_PluginManager> ModelAPI_PluginManager::get()
50 if (!MY_MANAGER) { // import Model library that implements this interface of ModelAPI
52 std::cout << "ModelAPI_PluginManager::get: " << "Model library has not been loaded from xml." << std::endl;
54 Config_ModuleReader::loadLibrary("Model");