]> SALOME platform Git repositories - modules/shaper.git/blob - src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp
Salome HOME
Speed up the redraw of sketch with constraints moved by the point of the line
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plugin.cpp
1 #include "ConstructionPlugin_Plugin.h"
2 #include "ConstructionPlugin_Point.h"
3
4 #include <ModelAPI_Session.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_CONSTRUCTION_INSTANCE = new ConstructionPlugin_Plugin();
11
12 ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
13 {
14   // register this plugin
15   ModelAPI_Session::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 }