61 primitiveEntryIstream,
79 primitiveEntryIstream,
98 primitiveEntryIstream,
120 if (fName.empty() || fName.isAbsolute())
132 const bool mandatory,
141 rioPtr && rioPtr->global()
163 const_cast<regIOobject&
>(*rioPtr).addWatch(fName);
166 parentDict.
read(ifs);
180 <<
"Cannot open include file "
181 << (ifs.name().size() ? ifs.name() : rawName)
191 const bool mandatory,
201 rioPtr && rioPtr->global()
226 entry.
read(parentDict, ifs);
240 <<
"Cannot open include file "
241 << (ifs.name().size() ? ifs.name() : rawName)
242 <<
" 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.
virtual const fileName & name() const
The name of the stream.
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 std::string path(const std::string &str)
Return directory path name (part before last /).
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, expects a single string to follow.
static fileName resolveFile(const fileName &dir, const fileName &f, const dictionary &dict)
Expand include fileName and return.
static bool log
Report to stdout which file is included.
static bool execute(const bool mandatory, dictionary &parentDict, Istream &is)
Include file in a sub-dict context.
A dictionary directive for conditionally including a file, expects a single string to follow.
static bool execute(dictionary &parentDict, Istream &is)
Include 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 bool read(const dictionary &dict, Istream &is)
Read tokens from the given stream.
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 void addWatch()
Add file watch on object (if registered and READ_IF_MODIFIED).
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
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).
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).