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