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));
129 parentDict.
read(ifs);
139 <<
"Cannot open etc file "
140 << (ifs.name().size() ? ifs.name() : rawName)
141 <<
" while reading dictionary " << parentDict.
name()
150 const bool mandatory,
157 const fileName fName(resolveEtcFile(rawName, parentDict));
169 entry.read(parentDict, ifs);
179 <<
"Cannot open etc file "
180 << (ifs.name().size() ? ifs.name() : rawName)
181 <<
" while reading dictionary " << parentDict.
name()
196 return includeEtcEntry::execute(
true, parentDict, is);
207 return includeEtcEntry::execute(
true, parentDict,
entry, is);
217 return includeEtcEntry::execute(
false, parentDict, is);
228 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.
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)....
messageStream Info
Information stream (uses stdout - output is on the master only)
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 '/'.