]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSetPlugin/PartSetPlugin_Plugin.cpp
Salome HOME
Fix of the processEvents call on Linux
[modules/shaper.git] / src / PartSetPlugin / PartSetPlugin_Plugin.cpp
index 85ea1c37eacf527337a523ae115b3684134ef227..0ad4b8b928ad69e4ec78822999fedf0fa66e1e3c 100644 (file)
@@ -1,24 +1,32 @@
 #include "PartSetPlugin_Plugin.h"
 #include "PartSetPlugin_Part.h"
-#include <ModelAPI_PluginManager.h>
+#include "PartSetPlugin_Duplicate.h"
+#include "PartSetPlugin_Remove.h"
+#include <ModelAPI_Session.h>
 #include <ModelAPI_Document.h>
 
 using namespace std;
 
 // the only created instance of this plugin
-static PartSetPlugin_Plugin* MY_INSTANCE = new PartSetPlugin_Plugin();
+static PartSetPlugin_Plugin* MY_PARTSET_INSTANCE = new PartSetPlugin_Plugin();
 
-PartSetPlugin_Plugin::PartSetPlugin_Plugin() 
+PartSetPlugin_Plugin::PartSetPlugin_Plugin()
 {
   // register this plugin
-  ModelAPI_PluginManager::get()->registerPlugin(this);
+  ModelAPI_Session::get()->registerPlugin(this);
 }
 
-boost::shared_ptr<ModelAPI_Feature> PartSetPlugin_Plugin::createFeature(string theFeatureID)
+FeaturePtr PartSetPlugin_Plugin::createFeature(string theFeatureID)
 {
-  if (theFeatureID == "Part") {
-    return boost::shared_ptr<ModelAPI_Feature>(new PartSetPlugin_Part);
+  if (theFeatureID == PartSetPlugin_Part::ID()) {
+    return FeaturePtr(new PartSetPlugin_Part);
+  }
+  if (theFeatureID == "duplicate") {
+    return FeaturePtr(new PartSetPlugin_Duplicate);
+  }
+  if (theFeatureID == "remove") {
+    return FeaturePtr(new PartSetPlugin_Remove);
   }
   // feature of such kind is not found
-  return boost::shared_ptr<ModelAPI_Feature>();
+  return FeaturePtr();
 }