1 #include "PartSetPlugin_Plugin.h"
2 #include "PartSetPlugin_Part.h"
3 #include "PartSetPlugin_Duplicate.h"
4 #include "PartSetPlugin_Remove.h"
5 #include <ModelAPI_PluginManager.h>
6 #include <ModelAPI_Document.h>
10 // the only created instance of this plugin
11 static PartSetPlugin_Plugin* MY_INSTANCE = new PartSetPlugin_Plugin();
13 PartSetPlugin_Plugin::PartSetPlugin_Plugin()
15 // register this plugin
16 ModelAPI_PluginManager::get()->registerPlugin(this);
19 FeaturePtr PartSetPlugin_Plugin::createFeature(string theFeatureID)
21 if (theFeatureID == PartSetPlugin_Part::ID()) {
22 return FeaturePtr(new PartSetPlugin_Part);
24 if (theFeatureID == "duplicate") {
25 return FeaturePtr(new PartSetPlugin_Duplicate);
27 if (theFeatureID == "remove") {
28 return FeaturePtr(new PartSetPlugin_Remove);
30 // feature of such kind is not found