Salome HOME
Issue #273: Add copyright string
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plugin.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 #include "ConstructionPlugin_Plugin.h"
4 #include "ConstructionPlugin_Point.h"
5
6 #include <ModelAPI_Session.h>
7 #include <ModelAPI_Document.h>
8
9 using namespace std;
10
11 // the only created instance of this plugin
12 static ConstructionPlugin_Plugin* MY_CONSTRUCTION_INSTANCE = new ConstructionPlugin_Plugin();
13
14 ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
15 {
16   // register this plugin
17   ModelAPI_Session::get()->registerPlugin(this);
18 }
19
20 FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID)
21 {
22   if (theFeatureID == CONSTRUCTION_POINT_KIND) {
23     return FeaturePtr(new ConstructionPlugin_Point);
24   }
25   // feature of such kind is not found
26   return FeaturePtr();
27 }