1 #include "SketchPlugin_Plugin.h"
2 #include "SketchPlugin_Sketch.h"
3 #include "SketchPlugin_Line.h"
4 #include <ModelAPI_PluginManager.h>
5 #include <ModelAPI_Document.h>
9 // the only created instance of this plugin
10 static SketchPlugin_Plugin* MY_INSTANCE = new SketchPlugin_Plugin();
12 SketchPlugin_Plugin::SketchPlugin_Plugin()
14 // register this plugin
15 ModelAPI_PluginManager::get()->registerPlugin(this);
18 boost::shared_ptr<ModelAPI_Feature> SketchPlugin_Plugin::createFeature(string theFeatureID)
20 if (theFeatureID == "Sketch") {
21 return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Sketch);
23 else if (theFeatureID == "SketchLine") {
24 return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Line);
26 // feature of such kind is not found
27 return boost::shared_ptr<ModelAPI_Feature>();