37 namespace functionEntries
53 primitiveEntryIstream,
63 bool Foam::functionEntries::messageDirective::evaluate
65 const dictionary& parentDict,
74 if (tok.isStringType())
79 str = tok.stringToken();
90 "Premature end while reading #message - missing '}'?" 97 <<
"Invalid input for #message." 98 " Expecting a string or block to expand, but found" <<
nl 110 << str <<
" (file: \"" 111 << parentDict.relativeName() <<
"\" line: " Begin block [isseparator].
errorManipArg< error, int > exit(error &err, const int errNo=1)
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 continueReadUntilRightBrace(Istream &is, std::string &str, const bool stripComments=true)
Slurp a string until a closing '}' is found.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool master(const int communicator=-1)
Like Pstream::master but with a Pstream::parRun guard in case Pstream has not yet been initialised...
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read...
static void reportReadWarning(const IOstream &, const std::string &)
Report a read warning (on std::cerr)
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
Ostream & flush(Ostream &os)
Flush stream.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void inplaceTrim(std::string &s)
Trim leading and trailing whitespace inplace.
Macros for easy insertion into member function selection tables.
addNamedToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, dictionaryIstream, calc)
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...
static bool execute(const dictionary &parentDict, primitiveEntry &entry, Istream &is)
Execute in a primitiveEntry context.
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 ...