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)
66 if (
mode ==
"merge" ||
mode ==
"default")
70 else if (
mode ==
"overwrite")
74 else if (
mode ==
"protect")
78 else if (
mode ==
"warn")
82 else if (
mode ==
"error")
89 <<
"unsupported input mode '" <<
mode 90 <<
"' ... defaulting to 'merge'" 117 return mode_ == MERGE;
123 return mode_ == OVERWRITE;
129 return mode_ == PROTECT;
134 return mode_ == ERROR;
static bool execute(dictionary &parentDict, Istream &)
Execute the functionEntry in a sub-dict context.
A list of keyword definitions, which are a keyword followed by any number of values (e...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
addToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, dictionaryIstream)
static bool protect()
Return true if the inputMode is protect.
A class for handling words, derived from string.
static void clear()
Reset the inputMode to default (ie, merge)
static bool merge()
Return true if the inputMode is merge.
#define WarningInFunction
Report a warning using Foam::Warning.
mode_t mode(const fileName &)
Return the file mode.
Macros for easy insertion into member function selection tables.
static bool overwrite()
Return true if the inputMode is overwrite.
static bool error()
Return true if the inputMode is error.