1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 #include "PartSetPlugin_Plugin.h"
4 #include "PartSetPlugin_Part.h"
5 #include "PartSetPlugin_Duplicate.h"
6 #include "PartSetPlugin_Remove.h"
7 #include <ModelAPI_Session.h>
8 #include <ModelAPI_Document.h>
12 // the only created instance of this plugin
13 static PartSetPlugin_Plugin* MY_PARTSET_INSTANCE = new PartSetPlugin_Plugin();
15 PartSetPlugin_Plugin::PartSetPlugin_Plugin()
17 // register this plugin
18 ModelAPI_Session::get()->registerPlugin(this);
21 FeaturePtr PartSetPlugin_Plugin::createFeature(string theFeatureID)
23 if (theFeatureID == PartSetPlugin_Part::ID()) {
24 return FeaturePtr(new PartSetPlugin_Part);
26 if (theFeatureID == PartSetPlugin_Duplicate::ID()) {
27 return FeaturePtr(new PartSetPlugin_Duplicate);
29 if (theFeatureID == PartSetPlugin_Remove::ID()) {
30 return FeaturePtr(new PartSetPlugin_Remove);
32 // feature of such kind is not found