1 #include <FeaturesPlugin_Plugin.h>
3 #include <FeaturesPlugin_Boolean.h>
4 #include <FeaturesPlugin_Extrusion.h>
5 #include <FeaturesPlugin_Group.h>
6 #include <FeaturesPlugin_Placement.h>
8 #include <ModelAPI_Session.h>
16 // the only created instance of this plugin
17 static FeaturesPlugin_Plugin* MY_FEATURES_INSTANCE = new FeaturesPlugin_Plugin();
19 FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()
21 // register this plugin
22 ModelAPI_Session::get()->registerPlugin(this);
25 FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)
27 if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {
28 return FeaturePtr(new FeaturesPlugin_Extrusion);
29 } else if (theFeatureID == FeaturesPlugin_Boolean::ID()) {
30 return FeaturePtr(new FeaturesPlugin_Boolean);
31 } else if (theFeatureID == FeaturesPlugin_Group::ID()) {
32 return FeaturePtr(new FeaturesPlugin_Group);
33 } else if (theFeatureID == FeaturesPlugin_Placement::ID()) {
34 return FeaturePtr(new FeaturesPlugin_Placement);
36 // feature of such kind is not found