49 #include "../Text/TextTools.h"
50 #include "../App/ApplicationTools.h"
56 string AutoParameter::CONSTRAINTS_AUTO =
"auto";
57 string AutoParameter::CONSTRAINTS_IGNORE =
"ignore";
58 string AutoParameter::CONSTRAINTS_KEEP =
"keep";
62 AutoParameter::AutoParameter(
const std::string& name,
double value, std::shared_ptr<Constraint> constraint) :
90 (*messageHandler_) <<
"Constraint match at parameter ";
91 (*messageHandler_) <<
name_;
92 (*messageHandler_) <<
", badValue = ";
94 (*messageHandler_) <<
" ";
97 double limit =
constraint_->getAcceptedLimit(value);
AutoParameter(const std::string &name="", double value=0, std::shared_ptr< Constraint > constraint=0)
Build a new AutoParameter.
virtual void setValue(double value)
Set the value of this parameter.
AutoParameter & operator=(const AutoParameter ¶m)
Assignment operator.
OutputStream * messageHandler_
Exception thrown when a value do not match a given constraint.
virtual double getBadValue() const
Get the value that doesn't match the constraint.
This class is designed to facilitate the manipulation of parameters.
virtual void setValue(double value)
Set the value of this parameter.
std::shared_ptr< Constraint > constraint_
Parameter & operator=(const Parameter ¶m)
Assignment operator.