1 #include "SketchPlugin_Plugin.h"
2 #include "SketchPlugin_Sketch.h"
3 #include <ModelAPI_PluginManager.h>
4 #include <ModelAPI_Document.h>
8 // the only created instance of this plugin
9 static SketchPlugin_Plugin* MY_INSTANCE = new SketchPlugin_Plugin();
11 SketchPlugin_Plugin::SketchPlugin_Plugin()
13 // register this plugin
14 ModelAPI_PluginManager::get()->registerPlugin(this);
17 boost::shared_ptr<ModelAPI_Feature> SketchPlugin_Plugin::createFeature(string theFeatureID)
19 if (theFeatureID == "Sketch") {
20 return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Sketch);
22 /*else if (theFeatureID == "Point") {
23 return shared_ptr<ModelAPI_Feature>(new SketchPlugin_Point);
25 // feature of such kind is not found
26 return boost::shared_ptr<ModelAPI_Feature>();