Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plugin.cpp
1 #include "ConstructionPlugin_Plugin.h"
2 #include "ConstructionPlugin_Point.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 ConstructionPlugin_Plugin* MY_INSTANCE = new ConstructionPlugin_Plugin();
11
12 ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
13 {
14   // register this plugin
15   ModelAPI_PluginManager::get()->registerPlugin(this);
16 }
17
18 FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID)
19 {
20   if (theFeatureID == CONSTRUCTION_POINT_KIND) {
21     return FeaturePtr(new ConstructionPlugin_Point);
22   }
23   // feature of such kind is not found
24   return FeaturePtr();
25 }