48 const std::string& str,
49 const bool allowInvalid
96 <<
"unknown switch word " << str <<
nl 108 const Switch& defaultValue
125 return names[switch_];
A list of keyword definitions, which are a keyword followed by any number of values (e...
bool readIfPresent(const word &, const dictionary &)
Update the value of the Switch if it is found in the dictionary.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
T lookupOrAddDefault(const word &, const T &, bool recursive=false, bool patternMatch=true)
Find and return a T, if not found return the given.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
static const char * names[INVALID+1]
The set of names corresponding to the switchType enumeration.
static Switch lookupOrAddToDict(const word &, dictionary &, const Switch &defaultValue=false)
Construct from dictionary, supplying default value so that if the.
bool valid() const
Return true if the Switch has a valid value.
A class for handling words, derived from string.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
errorManip< error > abort(error &err)
word name(const complex &)
Return a string representation of a complex.
const char * asText() const
Return a text representation of the Switch.
switchType
The various text representations for a switch value.