X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionPlugin%2FConstructionPlugin_Plugin.cpp;h=2d853ebd0ce1defd27172297efc257dad371eba0;hb=50e082b16ea4f2fd6e94ddb6879112036a0610aa;hp=a825c5608e0a96cc95a2a453623bc65088706c6e;hpb=fb0d3e35664d7c763e83a17e42abdbf235eb3fda;p=modules%2Fshaper.git diff --git a/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp b/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp index a825c5608..2d853ebd0 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Plugin.cpp @@ -1,28 +1,25 @@ #include "ConstructionPlugin_Plugin.h" #include "ConstructionPlugin_Point.h" -#include "ConstructionPlugin_Extrusion.h" -#include +#include #include using namespace std; // the only created instance of this plugin -static ConstructionPlugin_Plugin* MY_INSTANCE = new ConstructionPlugin_Plugin(); +static ConstructionPlugin_Plugin* MY_CONSTRUCTION_INSTANCE = new ConstructionPlugin_Plugin(); -ConstructionPlugin_Plugin::ConstructionPlugin_Plugin() +ConstructionPlugin_Plugin::ConstructionPlugin_Plugin() { // register this plugin - ModelAPI_PluginManager::get()->registerPlugin(this); + ModelAPI_Session::get()->registerPlugin(this); } -boost::shared_ptr ConstructionPlugin_Plugin::createFeature(string theFeatureID) +FeaturePtr ConstructionPlugin_Plugin::createFeature(string theFeatureID) { - if (theFeatureID == "Point") { - return boost::shared_ptr(new ConstructionPlugin_Point); - } else if (theFeatureID == "Extrusion") { - return boost::shared_ptr(new ConstructionPlugin_Extrusion); + if (theFeatureID == CONSTRUCTION_POINT_KIND) { + return FeaturePtr(new ConstructionPlugin_Point); } // feature of such kind is not found - return boost::shared_ptr(); + return FeaturePtr(); }