62 primitiveEntryIstream,
80 primitiveEntryIstream,
101 if (fName.empty() || fName.isAbsolute())
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)
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()
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
Macros for easy insertion into member function selection tables.
#define addNamedToMemberFunctionSelectionTable(baseType, thisType, funcName, argNames, lookupName)
Add to hash-table of functions with 'lookupName' as the key.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void size(const label n)
Older name for setAddressableSize.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & topDict() const
Return the top of the tree.
fileName relativeName(const bool caseTag=false) const
The dictionary name relative to the case.
bool read(Istream &is)
Read dictionary from Istream (discards the header). Reads entries until EOF or when the first token i...
A keyword and a list of tokens is an 'entry'.
entry(const keyType &keyword)
Construct from keyword.
A class for handling file names.
static bool isAbsolute(const std::string &str)
Return true if filename starts with a '/' or '\' or (windows-only) with a filesystem-root.
A dictionary directive for including a file found using the Foam::findEtcFile() mechanism.
static bool log
Report to stdout which file is included.
static fileName resolveEtcFile(const fileName &f, const dictionary &dict)
Expand include fileName and search etc directories for the file.
static bool execute(const bool mandatory, dictionary &parentDict, Istream &is)
Include file in a sub-dict context.
A dictionary directive for conditionally including an etc file, expects a single string to follow.
static bool execute(dictionary &parentDict, Istream &is)
Include etc file (if it exists) in a sub-dict context.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
primitiveEntry(const keyType &key)
Construct from keyword and no tokens.
virtual const dictionary & dict() const
This entry is not a dictionary, calling this function generates a FatalError.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool global() const
Is object global.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Functions to search 'etc' directories for configuration files etc.
Namespace for containing a functionEntry.
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.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler().
messageStream Info
Information stream (stdout output on master, null elsewhere).
fileName findEtcFile(const fileName &name, const bool mandatory=false, unsigned short location=0777)
Search for a single FILE within the etc directories.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).