Add Attribute Type PredefinedString
Attributes of type PredefinedString
should only accept strings which are contained in a predefined set of strings. For each such attribute the set of accepted strings have to be provided to the constructor. The input of the user is then checked and if the provided string isn't contained in the predefined set an exception is thrown. Examples for such attributes are the attribute FSTYPE
of the FIELDSOLVER
command which accepts FFT
, FFTPERIODIC
, SAAMG
and NONE
or the attribute EMISSIONMODEL
of the DISTRIBUTION
command which accepts NONE
, ASTRA
and NONEQUIL
.
The list of accepted strings as well as the default value, if any, are added to the help message.
The type of most UpperCaseString
attributes can be change to PredefinedString
.