37namespace functionEntries
53 primitiveEntryIstream,
65 const dictionary& parentDict,
74 if (tok.isStringType())
79 str = tok.stringToken();
90 "Premature end while reading #word - missing '}'?"
97 <<
"Invalid input for #word."
98 " Expecting a string or block to expand, but found" <<
nl
109 tok = std::move(result);
127 token tok(evaluate(parentDict, is));
132 entry.append(std::move(tok),
true);
145 token tok(evaluate(parentDict, is));
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.
void evaluate()
Evaluate boundary conditions.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void putBack(const token &tok)
Put back a token. Only a single put back is permitted.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A keyword and a list of tokens is an 'entry'.
static void reportReadWarning(const IOstream &, const std::string &)
Report a read warning (on std::cerr)
Converts/expands string content to a word. This can be useful for composition of names.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
static bool continueReadUntilRightBrace(Istream &is, std::string &str, const bool stripComments=true)
Slurp a string until a closing '}' is found.
virtual bool execute()
Calculate the output fields.
virtual void validate()
Validate the turbulence fields after construction.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
A token holds an item read from Istream.
@ BEGIN_BLOCK
Begin block [isseparator].
bool good() const noexcept
True if token is not UNDEFINED or ERROR.
static const token undefinedToken
An undefined token.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void inplaceExpand(std::string &s, const HashTable< string > &mapping, const char sigil='$')
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)