Class Scine::Utils::UniversalSettings::BoolDescriptor

class BoolDescriptor : public Scine::Utils::UniversalSettings::SettingDescriptor

Setting descriptor-derived boolean value.

SettingDescriptor for a bool value. This is a class that contains a string that explains what the setting is for and also a default value.

Public Functions

BoolDescriptor(std::string propertyDescription)

Construct with string describing what the value 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 getDefaultValue() const

Get the default value.

Return

Default value

void setDefaultValue(bool def)

Set the default value.

Parameters
  • def: The value to be set as default