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 #include <ModelAPI_Object.h>
11 // to avoid unresolved ModelAPI_Data()
12 #include <ModelAPI_Data.h>
13 // to avoid unresolved ModelAPI_Plugin()
14 #include <ModelAPI_Plugin.h>
15 #include <ModelAPI_Attribute.h>
16 #include <ModelAPI_AttributeDocRef.h>
17 #include <ModelAPI_AttributeDouble.h>
18 #include <ModelAPI_AttributeBoolean.h>
19 #include <ModelAPI_AttributeReference.h>
20 #include <ModelAPI_AttributeRefAttr.h>
21 #include <ModelAPI_AttributeRefList.h>
22 #include <ModelAPI_Events.h>
23 #include <ModelAPI_Validator.h>
25 #include <Config_ModuleReader.h>
39 /// Manager that will be initialized from Model package, one per application
40 boost::shared_ptr<ModelAPI_PluginManager> MY_MANAGER;
42 ModelAPI_PluginManager::ModelAPI_PluginManager()
46 void ModelAPI_PluginManager::setPluginManager(
47 boost::shared_ptr<ModelAPI_PluginManager> theManager)
49 MY_MANAGER = theManager;
52 boost::shared_ptr<ModelAPI_PluginManager> ModelAPI_PluginManager::get()
54 if (!MY_MANAGER) { // import Model library that implements this interface of ModelAPI
55 Config_ModuleReader::loadLibrary("Model");
60 const ModelAPI_EventCreator* MY_CREATOR = 0; ///< instance of the events creator, one pre application
62 const ModelAPI_EventCreator* ModelAPI_EventCreator::get()
64 if (!MY_CREATOR) { // import Model library that implements this interface of ModelAPI
65 Config_ModuleReader::loadLibrary("Model");
70 void ModelAPI_EventCreator::set(const ModelAPI_EventCreator* theCreator)
72 MY_CREATOR = theCreator;