]> SALOME platform Git repositories - modules/shaper.git/blob - src/ConstructionPlugin/ConstructionPlugin_Plugin.cxx
Salome HOME
Separation of Construction plugin from PartSet plugin. Each plugin package contains...
[modules/shaper.git] / src / ConstructionPlugin / ConstructionPlugin_Plugin.cxx
1 #include "ConstructionPlugin_Plugin.h"
2 #include "ConstructionPlugin_Point.h"
3 #include <ModelAPI_PluginManager.h>
4 #include <ModelAPI_Document.h>
5
6 using namespace std;
7
8 // the only created instance of this plugin
9 static ConstructionPlugin_Plugin* MY_INSTANCE = new ConstructionPlugin_Plugin();
10
11 ConstructionPlugin_Plugin::ConstructionPlugin_Plugin() 
12 {
13   // register this plugin
14   ModelAPI_PluginManager::get()->registerPlugin(this);
15 }
16
17 shared_ptr<ModelAPI_Feature> ConstructionPlugin_Plugin::createFeature(string theFeatureID)
18 {
19   if (theFeatureID == "Point") {
20     return shared_ptr<ModelAPI_Feature>(new ConstructionPlugin_Point);
21   }
22   // feature of such kind is not found
23   return shared_ptr<ModelAPI_Feature>();
24 }