1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 #include <FeaturesPlugin_Plugin.h>
5 #include <FeaturesPlugin_Boolean.h>
6 #include <FeaturesPlugin_Extrusion.h>
7 #include <FeaturesPlugin_Group.h>
8 #include <FeaturesPlugin_Placement.h>
10 #include <ModelAPI_Session.h>
18 // the only created instance of this plugin
19 static FeaturesPlugin_Plugin* MY_FEATURES_INSTANCE = new FeaturesPlugin_Plugin();
21 FeaturesPlugin_Plugin::FeaturesPlugin_Plugin()
23 // register this plugin
24 ModelAPI_Session::get()->registerPlugin(this);
27 FeaturePtr FeaturesPlugin_Plugin::createFeature(string theFeatureID)
29 if (theFeatureID == FeaturesPlugin_Extrusion::ID()) {
30 return FeaturePtr(new FeaturesPlugin_Extrusion);
31 } else if (theFeatureID == FeaturesPlugin_Boolean::ID()) {
32 return FeaturePtr(new FeaturesPlugin_Boolean);
33 } else if (theFeatureID == FeaturesPlugin_Group::ID()) {
34 return FeaturePtr(new FeaturesPlugin_Group);
35 } else if (theFeatureID == FeaturesPlugin_Placement::ID()) {
36 return FeaturePtr(new FeaturesPlugin_Placement);
38 // feature of such kind is not found