X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSketchPlugin%2FSketchPlugin_Plugin.cpp;h=14e61b2362c7806c27657e8017b92cb77c2f95c8;hb=058edf4f920184f6d5a58e11b65991d35330ad16;hp=23a6cf05a17cc3fb364a10d7f616943df9d71c6b;hpb=c9770e53785962f70c0b1c10dcc03a23980048c9;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 23a6cf05a..14e61b236 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -24,38 +24,38 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() ModelAPI_PluginManager::get()->registerPlugin(this); } -boost::shared_ptr SketchPlugin_Plugin::createFeature(string theFeatureID) +FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID) { - if (theFeatureID == "Sketch") { - return boost::shared_ptr(new SketchPlugin_Sketch); + if (theFeatureID == SKETCH_KIND) { + return FeaturePtr(new SketchPlugin_Sketch); } - else if (theFeatureID == "SketchPoint") { - return boost::shared_ptr(new SketchPlugin_Point); + else if (theFeatureID == SKETCH_POINT_KIND) { + return FeaturePtr(new SketchPlugin_Point); } - else if (theFeatureID == "SketchLine") { - return boost::shared_ptr(new SketchPlugin_Line); + else if (theFeatureID == SKETCH_LINE_KIND) { + return FeaturePtr(new SketchPlugin_Line); } - else if (theFeatureID == "SketchCircle") { - return boost::shared_ptr(new SketchPlugin_Circle); + else if (theFeatureID == SKETCH_CIRCLE_KIND) { + return FeaturePtr(new SketchPlugin_Circle); } - else if (theFeatureID == "SketchConstraintCoincidence") { - return boost::shared_ptr(new SketchPlugin_ConstraintCoincidence); + else if (theFeatureID == SKETCH_CONSTRAINT_COINCIDENCE_KIND) { + return FeaturePtr(new SketchPlugin_ConstraintCoincidence); } - else if (theFeatureID == "SketchConstraintDistance") { - return boost::shared_ptr(new SketchPlugin_ConstraintDistance); + else if (theFeatureID == SKETCH_CONSTRAINT_DISTANCE_KIND) { + return FeaturePtr(new SketchPlugin_ConstraintDistance); } - else if (theFeatureID == "SketchConstraintLength") { - return boost::shared_ptr(new SketchPlugin_ConstraintLength); + else if (theFeatureID == SKETCH_CONSTRAINT_LENGTH_KIND) { + return FeaturePtr(new SketchPlugin_ConstraintLength); } - else if (theFeatureID == "SketchConstraintParallel") { - return boost::shared_ptr(new SketchPlugin_ConstraintParallel); + else if (theFeatureID == SKETCH_CONSTRAINT_PARALLEL_KIND) { + return FeaturePtr(new SketchPlugin_ConstraintParallel); } - else if (theFeatureID == "SketchConstraintPerpendicular") { - return boost::shared_ptr(new SketchPlugin_ConstraintPerpendicular); + else if (theFeatureID == SKETCH_CONSTRAINT_PERPENDICULAR_KIND) { + return FeaturePtr(new SketchPlugin_ConstraintPerpendicular); } - else if (theFeatureID == "SketchConstraintRadius") { - return boost::shared_ptr(new SketchPlugin_ConstraintRadius); + else if (theFeatureID == SKETCH_CONSTRAINT_RADIUS_KIND) { + return FeaturePtr(new SketchPlugin_ConstraintRadius); } // feature of such kind is not found - return boost::shared_ptr(); + return FeaturePtr(); }