Class Scine::Utils::UniversalSettings::CollectionListDescriptor

class CollectionListDescriptor : public Scine::Utils::UniversalSettings::SettingDescriptor

SettingDescriptor for multiple SettingsDescriptors.

Public Functions

CollectionListDescriptor(std::string propertyDescription, DescriptorCollection base)

Constructor.

Parameters
  • propertyDescription: String describing what the list of settings is for

  • base: A list of SettingsDescriptors that set what ‘fields’ and default values exist for this setting

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(GenericValue::CollectionList v) const

Checks whether a supplied list of string, GenericValues match the expected fields and valid values set by this instance.

Return

Whether the supplied object is valid with the configuration set

Parameters
  • v: A vector<ValueCollection>, which in turn is just a list of string and GenericValue pairs, that map fields to values

const DescriptorCollection &getDescriptorCollection() const

Get the configuration of this setting.

Return

The configuration object of this setting