Go to the documentation of this file.
44 namespace functionEntries
60 primitiveEntryIstream,
78 primitiveEntryIstream,
111 const bool mandatory,
117 const fileName fName(resolveEtcFile(rawName, parentDict));
128 parentDict.
read(ifs);
138 <<
"Cannot open etc file "
139 << (ifs.name().size() ? ifs.name() : rawName)
140 <<
" while reading dictionary " << parentDict.
name()
149 const bool mandatory,
156 const fileName fName(resolveEtcFile(rawName, parentDict));
167 entry.read(parentDict, ifs);
177 <<
"Cannot open etc file "
178 << (ifs.name().size() ? ifs.name() : rawName)
179 <<
" while reading dictionary " << parentDict.
name()
194 return includeEtcEntry::execute(
true, parentDict, is);
205 return includeEtcEntry::execute(
true, parentDict,
entry, is);
215 return includeEtcEntry::execute(
false, parentDict, is);
226 return includeEtcEntry::execute(
false, parentDict,
entry, is);
A keyword and a list of tokens is an 'entry'.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
A class for handling file names.
static bool execute(dictionary &parentDict, Istream &is)
Include etc file (if it exists) in a sub-dict context.
const fileOperation & fileHandler()
Get current file handler.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static fileName resolveEtcFile(const fileName &f, const dictionary &dict)
Expand include fileName and search etc directories for the file.
const fileName & name() const
The dictionary name.
fileName findEtcFile(const fileName &name, const bool mandatory=false, unsigned short location=0777)
Search for a single FILE within the etc directories.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void inplaceExpand(std::string &s, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
Macros for easy insertion into member function selection tables.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
addNamedToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, dictionaryIstream, calc)
static bool log
Report to stdout which file is included.
bool read(Istream &is)
Read dictionary from Istream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static bool execute(const bool mandatory, dictionary &parentDict, Istream &is)
Include file in a sub-dict context.
Functions to search 'etc' directories for configuration files etc.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
static bool isAbsolute(const std::string &str)
Return true if string starts with a '/'.