55bool Foam::functionEntries::ifEntry::isTrue(
ITstream& its)
75bool Foam::functionEntries::ifEntry::execute
77 DynamicList<filePos>& stack,
82 const label nNested = stack.size();
84 stack.push_back(filePos(is.name(), is.lineNumber()));
88 dynamic_cast<ISstream&
>(is).getLine(line);
91 IStringStream lineStream(line);
92 const primitiveEntry
e(
"ifEntry", parentDict, lineStream);
94 const bool doIf = ifEntry::isTrue(
e.stream());
102 if (stack.size() != nNested)
105 <<
"Did not find matching #endif for condition starting"
106 <<
" at line " << stack.back().second()
116bool Foam::functionEntries::ifEntry::execute
123 return execute(stack, 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.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
An input stream of tokens.
const token & front() const noexcept
Failsafe peek at the token at the front of the tokenList.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Conditional parsing of dictionary entries.
static bool execute(const bool equal, DynamicList< filePos > &stack, dictionary &parentDict, Istream &is)
Main driver: depending on 'equal' starts evaluating or skips forward to else.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
bool isScalar() const noexcept
Token is FLOAT or DOUBLE.
scalar scalarToken() const
Return float or double value.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Namespace for containing a functionEntry.
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)