Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Plugin.cxx
1 #include "PartSetPlugin_Plugin.h"
2 #include "PartSetPlugin_NewPart.h"
3 #include <ModelAPI_PluginManager.h>
4
5 using namespace std;
6
7 // the only created instance of this plugin
8 static PartSetPlugin_Plugin* MY_INSTANCE = new PartSetPlugin_Plugin();
9
10 PartSetPlugin_Plugin::PartSetPlugin_Plugin() 
11 {
12   // register this plugin
13   ModelAPI_PluginManager::get()->registerPlugin(this);
14 }
15
16 boost::shared_ptr<ModelAPI_Feature> PartSetPlugin_Plugin::createFeature(string theFeatureID)
17 {
18   if (theFeatureID == "new_part") {
19     return boost::shared_ptr<ModelAPI_Feature>(new PartSetPlugin_NewPart());
20   }
21   // feature of such kind is not found
22   return boost::shared_ptr<ModelAPI_Feature>();
23 }