X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFiltersAPI%2FFiltersAPI_Argument.cpp;h=d3d7eccc186c7b54d71fda57cc9f7f9c12472b50;hb=c0e273c1479a9940dbe4f966853c82a6b8709d88;hp=61d1d1d5974f8861359562526618058ed8c82f80;hpb=380f01e1fce1a012267d604a1190d04bf4659447;p=modules%2Fshaper.git diff --git a/src/FiltersAPI/FiltersAPI_Argument.cpp b/src/FiltersAPI/FiltersAPI_Argument.cpp index 61d1d1d59..d3d7eccc1 100644 --- a/src/FiltersAPI/FiltersAPI_Argument.cpp +++ b/src/FiltersAPI/FiltersAPI_Argument.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 CEA/DEN, EDF R&D // // 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::lowest() ) { + theDumper << myDouble.value(); + } + else if (myValue.empty()) { theDumper << myBoolean; - else + } + else{ theDumper << "\"" << myValue << "\""; + } } }