BaseOption
- class ase2sprkkr.common.options.BaseOption(definition, container=None)[source]
A base placeholder for a leaf element of a grammar file, both the a-value-holding ones (
Option
) and dummy ones (Dummy)Class hierarchy
Constructor
- __init__(definition, container=None)
Create the object. Just sets the two properties from the parameters.
- Parameters:
definition (ase2sprkkr.common.configuration_definitions.BaseDefinition) – Definition of this configuration object.
container (ase2sprkkr.common.configuration_containers.ConfigurationContainer) – The container, that owns this configuration object.
- _save_to_file(file, always=False, name_in_grammar=None, delimiter='')[source]
Write the name-value pair to the given file, if the value is set.
- as_dict(only_changed='basic', generated=False, copy=False)[source]
Return the value of self, in the case of container as a dictionary. To be redefined in the descendants.
- Parameters:
only_changed (bool | str) – Return only changed values, or all of them? If True, return only the values, that differ from the defaults. If False, return all the values. The default value ‘basic’ means, return all non-expert values and all changed expert values.
generated (bool) –
copy (bool) –