Salome HOME
updated copyright message
[modules/shaper.git] / src / FiltersAPI / FiltersAPI_Argument.cpp
index 5940ebb7fb75872a1b7c0feec458df522388c402..bf54fee45eca984578781b41c38f3f2f66b82451 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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 << "\"";
+    }
   }
 }