Class Scine::Utils::UniversalSettings::DoubleDescriptor¶
-
class
DoubleDescriptor
: public Scine::Utils::UniversalSettings::SettingDescriptor¶ SettingDescriptor for a floating-point value.
Can set boundaries on valid values and a default value for this kind of setting.
Public Functions
-
DoubleDescriptor
(std::string propertyDescription)¶ Constructor.
- Parameters
propertyDescription
: A string describing what the double is for
-
std::unique_ptr<SettingDescriptor>
clone
() const¶ Create a heap-allocated base pointer copy of this instance.
- Return
A heap-allocated copy of this instance
-
GenericValue
getDefaultGenericValue
() const¶ Creates a type-erased representation of the setting’s default value.
- Return
A type-erased representation of the setting’s default value
-
bool
validValue
(const GenericValue &v) const¶ Checks if a particular type-erased representation of a setting is a valid value for this kind of setting.
- Return
Whether the type-erased representation is a valid value for this kind of setting
- Parameters
v
: A type-erased setting representation
-
bool
validValue
(double v) const¶ Checks whether the supplied value is within the configured bounds.
-
double
getMinimum
() const¶ Returns the lower bound on valid values.
-
double
getMaximum
() const¶ Returns the upper bound on valid values.
-
double
getDefaultValue
() const¶ Returns the default value.
-
void
setMinimum
(double min)¶ Sets the lower bound on valid values.
-
void
setMaximum
(double max)¶ Sets the upper bound on valid values.
-
void
setDefaultValue
(double def)¶ Sets the default value.
-