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;
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 keyword definitions, which are a keyword followed by any number of values (e....
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.