]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchPlugin/SketchPlugin_Plugin.cpp
Salome HOME
Replace boost::shared_ptr<ModelAPI_Feature> on FeaturePtr
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Plugin.cpp
index 7f75377f2af0d507a8ffcb8df389e672844d7cac..14e61b2362c7806c27657e8017b92cb77c2f95c8 100644 (file)
@@ -24,38 +24,38 @@ SketchPlugin_Plugin::SketchPlugin_Plugin()
   ModelAPI_PluginManager::get()->registerPlugin(this);
 }
 
-boost::shared_ptr<ModelAPI_Feature> SketchPlugin_Plugin::createFeature(string theFeatureID)
+FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID)
 {
   if (theFeatureID == SKETCH_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Sketch);
+    return FeaturePtr(new SketchPlugin_Sketch);
   }
   else if (theFeatureID == SKETCH_POINT_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Point);
+    return FeaturePtr(new SketchPlugin_Point);
   }
   else if (theFeatureID == SKETCH_LINE_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Line);
+    return FeaturePtr(new SketchPlugin_Line);
   }
   else if (theFeatureID == SKETCH_CIRCLE_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_Circle);
+    return FeaturePtr(new SketchPlugin_Circle);
   }
   else if (theFeatureID == SKETCH_CONSTRAINT_COINCIDENCE_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintCoincidence);
+    return FeaturePtr(new SketchPlugin_ConstraintCoincidence);
   }
   else if (theFeatureID == SKETCH_CONSTRAINT_DISTANCE_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintDistance);
+    return FeaturePtr(new SketchPlugin_ConstraintDistance);
   }
   else if (theFeatureID == SKETCH_CONSTRAINT_LENGTH_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintLength);
+    return FeaturePtr(new SketchPlugin_ConstraintLength);
   }
   else if (theFeatureID == SKETCH_CONSTRAINT_PARALLEL_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintParallel);
+    return FeaturePtr(new SketchPlugin_ConstraintParallel);
   }
   else if (theFeatureID == SKETCH_CONSTRAINT_PERPENDICULAR_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintPerpendicular);
+    return FeaturePtr(new SketchPlugin_ConstraintPerpendicular);
   }
   else if (theFeatureID == SKETCH_CONSTRAINT_RADIUS_KIND) {
-    return boost::shared_ptr<ModelAPI_Feature>(new SketchPlugin_ConstraintRadius);
+    return FeaturePtr(new SketchPlugin_ConstraintRadius);
   }
   // feature of such kind is not found
-  return boost::shared_ptr<ModelAPI_Feature>();
+  return FeaturePtr();
 }