30 const std::string& name,
const std::string& help,
31 const std::initializer_list<std::string>& predefinedStrings,
32 const std::string& defaultValue)
34 for (
const std::string& value : predefinedStrings) {
43 static const std::string type(
"string");
50 throw ParseError(
"PredefinedString::parse",
"Unsupported value '" + value +
"'");
Abstract base class for attribute parsers.
void setPredefinedValues(const std::set< std::string > &, const std::string &)
Add predefined strings values to the help.
A representation of an Object attribute.
virtual void parse(Attribute &, Statement &, bool) const
Parse the attribute.
virtual const std::string & getType() const
Return attribute type string `‘string’'.
std::set< std::string > predefinedStrings_m
virtual ~PredefinedString()
Interface for statements.
A collection of routines to construct object Attributes and retrieve.
void setPredefinedString(Attribute &attr, const std::string &val)
Set predefined string value.
Representation objects and parsers for attribute expressions.
std::string parseStringValue(Statement &, const char msg[])
std::string toUpper(const std::string &str)