1 #include "ConstructionPlugin_Plugin.h"
2 #include "ConstructionPlugin_Point.h"
3 #include "ConstructionPlugin_Extrusion.h"
5 #include <ModelAPI_PluginManager.h>
6 #include <ModelAPI_Document.h>
10 // the only created instance of this plugin
11 static ConstructionPlugin_Plugin* MY_INSTANCE = new ConstructionPlugin_Plugin();
13 ConstructionPlugin_Plugin::ConstructionPlugin_Plugin()
15 // register this plugin
16 ModelAPI_PluginManager::get()->registerPlugin(this);
19 FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID)
21 if (theFeatureID == CONSTRUCTION_POINT_KIND) {
22 return FeaturePtr(new ConstructionPlugin_Point);
23 } else if (theFeatureID == CONSTRUCTION_EXTRUSION_KIND) {
24 return FeaturePtr(new ConstructionPlugin_Extrusion);
26 // feature of such kind is not found