Class Scine::Utils::UniversalSettings::DescriptorCollection

class DescriptorCollection : public Scine::Utils::UniversalSettings::SettingDescriptor

Setting that wraps a vector<pair<str, GenericDescriptor>>.

A setting (string descriptor, generic value pair) whose value is a list of string, GenericDescriptor pairs, which altogether define a nested list of descriptors.

Information

Checks whether a particular descriptor field exists in the configuration

bool empty() const

Checks whether the list of string, descriptor pairs is empty.

int size() const

Returns the number of string, descriptor pairs.

bool validValue(const ValueCollection &v) const

Determines whether a corresponding list of string, GenericValue pairs matches the configuration of this setting.

Return

Whether the supplied values match the setting configuration

Parameters

Public Functions

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