37namespace functionEntries
55bool Foam::functionEntries::ifEntry::isTrue(ITstream& its)
59 if (its.peekFirst().isScalar())
62 logic = Switch(its.first().scalarToken());
77 DynamicList<filePos>& stack,
78 dictionary& parentDict,
82 const label nNested = stack.size();
84 stack.append(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.last().second()
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 Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Conditional parsing of dictionary entries.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
virtual bool execute()
Calculate the output fields.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
errorManipArg< error, int > exit(error &err, const int errNo=1)