39 const entry* entryPtr = lookupEntryPtr(keyword, recursive, patternMatch);
41 if (entryPtr ==
nullptr)
46 ) <<
"keyword " << keyword <<
" is undefined in dictionary " 64 const entry* entryPtr = lookupEntryPtr(keyword, recursive, patternMatch);
72 if (writeOptionalEntries)
75 <<
"Optional entry '" << keyword <<
"' is not present," 76 <<
" returning the default value '" << deflt <<
"'" 94 const entry* entryPtr = lookupEntryPtr(keyword, recursive, patternMatch);
102 if (writeOptionalEntries)
105 <<
"Optional entry '" << keyword <<
"' is not present," 106 <<
" adding and returning the default value '" << deflt <<
"'" 125 const entry* entryPtr = lookupEntryPtr(keyword, recursive, patternMatch);
129 entryPtr->
stream() >> val;
134 if (writeOptionalEntries)
137 <<
"Optional entry '" << keyword <<
"' is not present," 138 <<
" the default value '" << val <<
"' will be used." A class for handling keywords in dictionaries.
errorManipArg< error, int > exit(error &err, const int errNo=1)
T lookupOrAddDefault(const word &, const T &, bool recursive=false, bool patternMatch=true)
Find and return a T, if not found return the given.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Traits class for primitives.
label k
Boltzmann constant.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read, written and printed, and the types and values of its tokens analysed.
T lookupType(const word &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
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.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
word name(const complex &)
Return a string representation of a complex.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void set(entry *)
Assign a new entry, overwrite any existing entry.
#define IOInfoInFunction(ios)
Report an IO information message using Foam::Info.
virtual ITstream & stream() const =0
Return token stream if this entry is a primitive entry.
A keyword and a list of tokens is an 'entry'.