Salome HOME
CEA : Lot2 - Add new filters
[modules/shaper.git] / src / FiltersAPI / FiltersAPI_Argument.cpp
index 30d5e36cd8d372e3e33f44c14f9415d2bf0691ee..90a79bb5d7b477bcb9f3dec335aeb071de475906 100644 (file)
@@ -28,6 +28,16 @@ FiltersAPI_Argument::FiltersAPI_Argument(const bool theValue)
 {
 }
 
+FiltersAPI_Argument::FiltersAPI_Argument(const ModelHighAPI_Double theValue)
+  : myDouble(theValue)
+{
+}
+
+FiltersAPI_Argument::FiltersAPI_Argument(const double& theValue)
+{
+  myDouble = theValue;
+}
+
 FiltersAPI_Argument::FiltersAPI_Argument(const std::string& theValue)
   : myValue(theValue)
 {
@@ -54,9 +64,14 @@ void FiltersAPI_Argument::dump(ModelHighAPI_Dumper& theDumper) const
     theDumper << "model.selection()"; // mySelectionAttr;
   }
   else if (mySelection.variantType() == ModelHighAPI_Selection::VT_Empty) {
-    if (myValue.empty())
+    if (myDouble.value() > std::numeric_limits<double>::lowest() ) {
+      theDumper << myDouble.value();
+    }
+    else if (myValue.empty()) {
       theDumper << myBoolean;
-    else
+    }
+    else{
       theDumper << "\"" << myValue << "\"";
+    }
   }
 }