1 #include <FeaturesPlugin_Plugin.h>
3 #include <FeaturesPlugin_Boolean.h>
4 #include <FeaturesPlugin_Extrusion.h>
5 #include <FeaturesPlugin_Group.h>
7 #include <ModelAPI_Session.h>
15 // the only created instance of this plugin
16 static FeaturesPlugin_Plugin* MY_FEATURES_INSTANCE = new FeaturesPlugin_Plugin();
18 FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()
20 // register this plugin
21 ModelAPI_Session::get()->registerPlugin(this);
24 FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)
26 if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {
27 return FeaturePtr(new FeaturesPlugin_Extrusion);
28 } else if (theFeatureID == FeaturesPlugin_Boolean::ID()) {
29 return FeaturePtr(new FeaturesPlugin_Boolean);
30 } else if (theFeatureID == FeaturesPlugin_Group::ID()) {
31 return FeaturePtr(new FeaturesPlugin_Group);
33 // feature of such kind is not found