1 // File: Model_PluginManager.cxx
2 // Created: 20 Mar 2014
3 // Author: Mikhail PONIKAROV
5 #include <Model_PluginManager.hxx>
6 #include <ModelAPI_Feature.hxx>
7 #include <Model_Feature.hxx>
8 #include <Event_Loop.hxx>
9 #include <Config_FeatureMessage.h>
13 boost::shared_ptr<ModelAPI_Feature> Model_PluginManager::CreateFeature(string theFeatureID)
15 return boost::shared_ptr<ModelAPI_Feature>(new Model_Feature());
18 Model_PluginManager::Model_PluginManager()
20 static Event_ID aFeatureEvent = Event_Loop::EventByName("Feature");
22 static Model_PluginManager* myImpl = new Model_PluginManager();
23 ModelAPI_PluginManager::SetPluginManager(boost::shared_ptr<ModelAPI_PluginManager>(myImpl));
24 // register the configuration reading listener
25 Event_Loop* aLoop = Event_Loop::Loop();
26 aLoop->RegisterListener(myImpl, aFeatureEvent);
29 void Model_PluginManager::ProcessEvent(const Event_Message* theMessage)
31 const Config_FeatureMessage* aMsg = dynamic_cast<const Config_FeatureMessage*>(theMessage);
33 // proccess the plugin info, load plugin