Add forgotten asDouble() method to the Parameter interface.
* New: In vlsisapd/PyConfiguration, add asDouble() to the Parameter Python wrapper. * New: In CRLCore/helpers/overlay, add support for float parameters in configuratuon.
This commit is contained in:
parent
09192ba084
commit
9c082230b5
|
@ -62,6 +62,8 @@ class Configuration:
|
||||||
Cfg.getParamEnumerate(attr).setInt( val )
|
Cfg.getParamEnumerate(attr).setInt( val )
|
||||||
else:
|
else:
|
||||||
Cfg.getParamInt(attr).setInt( val )
|
Cfg.getParamInt(attr).setInt( val )
|
||||||
|
elif isinstance(val, float):
|
||||||
|
p = Cfg.getParamDouble( attr ).setDouble( val )
|
||||||
elif '%' in val:
|
elif '%' in val:
|
||||||
Cfg.getParamPercentage(attr).setPercentage( float(val[:-1]) )
|
Cfg.getParamPercentage(attr).setPercentage( float(val[:-1]) )
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -210,6 +210,7 @@ namespace Cfg {
|
||||||
.def("asPercentageString", &Parameter::asPercentageString)
|
.def("asPercentageString", &Parameter::asPercentageString)
|
||||||
.def("asBool" , &Parameter::asBool)
|
.def("asBool" , &Parameter::asBool)
|
||||||
.def("asInt" , &Parameter::asInt)
|
.def("asInt" , &Parameter::asInt)
|
||||||
|
.def("asDouble" , &Parameter::asDouble)
|
||||||
.def("asPercentage" , &Parameter::asPercentage)
|
.def("asPercentage" , &Parameter::asPercentage)
|
||||||
.def("getSlaves" , &Parameter::getSlaves, return_value_policy<reference_existing_object>())
|
.def("getSlaves" , &Parameter::getSlaves, return_value_policy<reference_existing_object>())
|
||||||
.def("getValues" , &Parameter::getValues, return_value_policy<reference_existing_object>())
|
.def("getValues" , &Parameter::getValues, return_value_policy<reference_existing_object>())
|
||||||
|
|
Loading…
Reference in New Issue