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.
relativeName()
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.
relativeName()
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool read(Istream &is)
Read dictionary from Istream. Discards the header.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
constexpr char nl
The newline '\n' character (0x0a)
static bool execute(const bool mandatory, dictionary &parentDict, Istream &is)
Include file in a sub-dict context.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler()
static bool isAbsolute(const std::string &str)
Return true if filename starts with a '/' or '\' or (windows-only) with a filesystem-root.
static bool log
Report to stdout which file is included.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
static bool execute(dictionary &parentDict, Istream &is)
Include etc file (if it exists) in a sub-dict context.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read...
Functions to search 'etc' directories for configuration files etc.
void inplaceExpand(std::string &s, const HashTable< string > &mapping, const char sigil='$')
Inplace expand occurrences of variables according to the mapping. Does not use environment values...
virtual const dictionary & dict() const
This entry is not a dictionary,.
fileName relativeName(const bool caseTag=false) const
The dictionary name relative to the case.
static fileName resolveEtcFile(const fileName &f, const dictionary &dict)
Expand include fileName and search etc directories for the file.
fileName findEtcFile(const fileName &name, const bool mandatory=false, unsigned short location=0777)
Search for a single FILE within the etc directories.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Macros for easy insertion into member function selection tables.
messageStream Info
Information stream (stdout output on master, null elsewhere)
addNamedToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, dictionaryIstream, calc)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
A keyword and a list of tokens is an 'entry'.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...