32 const Foam::word Foam::functionEntries::inputModeEntry::typeName
34 Foam::functionEntries::inputModeEntry::typeName_()
39 int Foam::functionEntries::inputModeEntry::debug(0);
41 Foam::functionEntries::inputModeEntry::inputMode
42 Foam::functionEntries::inputModeEntry::mode_(MERGE);
46 namespace functionEntries
61 void Foam::functionEntries::inputModeEntry::setMode(Istream& is)
67 if (
mode ==
"merge" ||
mode ==
"default")
71 else if (
mode ==
"overwrite")
75 else if (
mode ==
"protect")
79 else if (
mode ==
"warn")
83 else if (
mode ==
"error")
90 <<
"unsupported input mode '" <<
mode
91 <<
"' ... defaulting to 'merge'"
118 return mode_ == MERGE;
124 return mode_ == OVERWRITE;
130 return mode_ == PROTECT;
135 return mode_ == ERROR;
Macros for easy insertion into member function selection tables.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Specify the input mode when reading dictionaries, expects a single word to follow.
static bool execute(dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
static bool overwrite()
Return true if the inputMode is overwrite.
static bool protect()
Return true if the inputMode is protect.
static bool merge()
Return true if the inputMode is merge.
static bool error()
Return true if the inputMode is error.
static void clear()
Reset the inputMode to default (ie, merge)
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
A class for handling words, derived from string.
#define WarningInFunction
Report a warning using Foam::Warning.
addToMemberFunctionSelectionTable(functionEntry, includeFvConstraintEntry, execute, dictionaryIstream)
mode_t mode(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file mode.
Ostream & endl(Ostream &os)
Add newline and flush stream.