X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FFiltersAPI%2FFiltersAPI_Argument.cpp;h=d3d7eccc186c7b54d71fda57cc9f7f9c12472b50;hb=c0e273c1479a9940dbe4f966853c82a6b8709d88;hp=5940ebb7fb75872a1b7c0feec458df522388c402;hpb=16dcb54e70a3c03c189b99e737224afea81e7f6c;p=modules%2Fshaper.git diff --git a/src/FiltersAPI/FiltersAPI_Argument.cpp b/src/FiltersAPI/FiltersAPI_Argument.cpp index 5940ebb7f..d3d7eccc1 100644 --- a/src/FiltersAPI/FiltersAPI_Argument.cpp +++ b/src/FiltersAPI/FiltersAPI_Argument.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 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 << "\""; + } } }