Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Plugin.cpp
index eb0b16c3f7bb697ef7796cc62c67efb8aab8fe37..0ac34f1f2c93a605f4a179e91ede927b1ca121af 100644 (file)
@@ -22,40 +22,34 @@ using namespace std;
 // the only created instance of this plugin
 static SketchPlugin_Plugin* MY_INSTANCE = new SketchPlugin_Plugin();
 
-SketchPlugin_Plugin::SketchPlugin_Plugin() 
+SketchPlugin_Plugin::SketchPlugin_Plugin()
 {
   PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
   ModelAPI_ValidatorsFactory* aFactory = aMgr->validators();
-  aFactory->registerValidator("SketchPlugin_DistanceAttrValidator", new SketchPlugin_DistanceAttrValidator);
+  aFactory->registerValidator("SketchPlugin_DistanceAttrValidator",
+                              new SketchPlugin_DistanceAttrValidator);
 
   // register this plugin
   ModelAPI_PluginManager::get()->registerPlugin(this);
 
   // register sketcher properties
-  Config_PropManager::registerProp("Sketch planes", 
-                                   "planes_color", "Color",
-                                   Config_Prop::Color, SKETCH_PLANE_COLOR);
-  Config_PropManager::registerProp("Sketch planes", 
-                                   "planes_size", "Size",
-                                   Config_Prop::Double, PLANE_SIZE);
-  Config_PropManager::registerProp("Sketch planes", 
-                                   "planes_thikness", "Thickness",
+  Config_PropManager::registerProp("Sketch planes", "planes_color", "Color", Config_Prop::Color,
+                                   SKETCH_PLANE_COLOR);
+  Config_PropManager::registerProp("Sketch planes", "planes_size", "Size", Config_Prop::Double,
+                                   PLANE_SIZE);
+  Config_PropManager::registerProp("Sketch planes", "planes_thikness", "Thickness",
                                    Config_Prop::Integer, SKETCH_WIDTH);
 
-  Config_PropManager::registerProp("Visualization", 
-                                   "parallel_color", "Parallel constraint color",
+  Config_PropManager::registerProp("Visualization", "parallel_color", "Parallel constraint color",
                                    Config_Prop::Color, PARALLEL_COLOR);
-  Config_PropManager::registerProp("Visualization", 
-                                   "perpendicular_color", "Perpendicular constraint color",
-                                   Config_Prop::Color, PERPENDICULAR_COLOR);
-  Config_PropManager::registerProp("Visualization", 
-                                   "distance_color", "Distance color",
+  Config_PropManager::registerProp("Visualization", "perpendicular_color",
+                                   "Perpendicular constraint color", Config_Prop::Color,
+                                   PERPENDICULAR_COLOR);
+  Config_PropManager::registerProp("Visualization", "distance_color", "Distance color",
                                    Config_Prop::Color, DISTANCE_COLOR);
-  Config_PropManager::registerProp("Visualization", 
-                                   "length_color", "Length color",
+  Config_PropManager::registerProp("Visualization", "length_color", "Length color",
                                    Config_Prop::Color, LENGTH_COLOR);
-  Config_PropManager::registerProp("Visualization", 
-                                   "radius_color", "Radius color",
+  Config_PropManager::registerProp("Visualization", "radius_color", "Radius color",
                                    Config_Prop::Color, RADIUS_COLOR);
 }
 
@@ -63,35 +57,25 @@ FeaturePtr SketchPlugin_Plugin::createFeature(string theFeatureID)
 {
   if (theFeatureID == SketchPlugin_Sketch::ID()) {
     return FeaturePtr(new SketchPlugin_Sketch);
-  }
-  else if (theFeatureID == SketchPlugin_Point::ID()) {
+  } else if (theFeatureID == SketchPlugin_Point::ID()) {
     return FeaturePtr(new SketchPlugin_Point);
-  }
-  else if (theFeatureID == SketchPlugin_Line::ID()) {
+  } else if (theFeatureID == SketchPlugin_Line::ID()) {
     return FeaturePtr(new SketchPlugin_Line);
-  }
-  else if (theFeatureID == SketchPlugin_Circle::ID()) {
+  } else if (theFeatureID == SketchPlugin_Circle::ID()) {
     return FeaturePtr(new SketchPlugin_Circle);
-  }
-  else if (theFeatureID == SketchPlugin_Arc::ID()) {
+  } else if (theFeatureID == SketchPlugin_Arc::ID()) {
     return FeaturePtr(new SketchPlugin_Arc);
-  }
-  else if (theFeatureID == SketchPlugin_ConstraintCoincidence::ID()) {
+  } else if (theFeatureID == SketchPlugin_ConstraintCoincidence::ID()) {
     return FeaturePtr(new SketchPlugin_ConstraintCoincidence);
-  }
-  else if (theFeatureID == SketchPlugin_ConstraintDistance::ID()) {
+  } else if (theFeatureID == SketchPlugin_ConstraintDistance::ID()) {
     return FeaturePtr(new SketchPlugin_ConstraintDistance);
-  }
-  else if (theFeatureID == SketchPlugin_ConstraintLength::ID()) {
+  } else if (theFeatureID == SketchPlugin_ConstraintLength::ID()) {
     return FeaturePtr(new SketchPlugin_ConstraintLength);
-  }
-  else if (theFeatureID == SketchPlugin_ConstraintParallel::ID()) {
+  } else if (theFeatureID == SketchPlugin_ConstraintParallel::ID()) {
     return FeaturePtr(new SketchPlugin_ConstraintParallel);
-  }
-  else if (theFeatureID == SketchPlugin_ConstraintPerpendicular::ID()) {
+  } else if (theFeatureID == SketchPlugin_ConstraintPerpendicular::ID()) {
     return FeaturePtr(new SketchPlugin_ConstraintPerpendicular);
-  }
-  else if (theFeatureID == SketchPlugin_ConstraintRadius::ID()) {
+  } else if (theFeatureID == SketchPlugin_ConstraintRadius::ID()) {
     return FeaturePtr(new SketchPlugin_ConstraintRadius);
   }
   // feature of such kind is not found