46 namespace functionEntries
62 primitiveEntryIstream,
80 primitiveEntryIstream,
113 const bool mandatory,
122 rioPtr && rioPtr->
global()
128 const fileName fName(resolveEtcFile(rawName, parentDict));
140 parentDict.
read(ifs);
154 <<
"Cannot open etc file " 155 << (ifs.name().size() ? ifs.name() : rawName)
156 <<
" while reading dictionary " << parentDict.
relativeName()
165 const bool mandatory,
175 rioPtr && rioPtr->
global()
181 const fileName fName(resolveEtcFile(rawName, parentDict));
193 entry.read(parentDict, ifs);
207 <<
"Cannot open etc file " 208 << (ifs.name().size() ? ifs.name() : rawName)
209 <<
" 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). Reads entries until EOF or when the first token i...
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.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
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.
const dictionary & topDict() const
Return the top of the tree.
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, calling this function generates a FatalError.
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.
virtual bool global() const
Is object global.
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.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
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 ...