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