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")
88 WarningIn(
"Foam::functionEntries::inputModeEntry::setMode(Istream&)")
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 overwrite()
Return true if the inputMode is overwrite.
static bool protect()
Return true if the inputMode is protect.
mode_t mode(const fileName &)
Return the file mode.
static bool merge()
Return true if the inputMode is merge.
static void clear()
Reset the inputMode to default (ie, merge)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A class for handling words, derived from string.
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...
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
addToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, dictionaryIstream)
static bool error()
Return true if the inputMode is error.
Macros for easy insertion into member function selection tables.