34 template<
class Context>
35 bool Foam::functionEntries::ifeqEntry::evaluate
38 DynamicList<filePos>& stack,
39 const dictionary& contextDict,
52 execute(stack, contextDict, context, is);
61 const ifEntry ife(is.lineNumber(), contextDict, is);
62 ife.execute(stack, contextDict, context, is);
90 const bool ok =
insert(contextDict, context, t, is);
102 template<
class Context>
103 bool Foam::functionEntries::ifeqEntry::execute
114 evaluate(
true, stack, contextDict, context, is);
169 evaluate(
false, stack, contextDict, context, is);
174 evaluate(
true, stack, contextDict, context, is);
181 template<
class Context>
182 bool Foam::functionEntries::ifeqEntry::execute
195 token cond1(
operator[](1));
196 cond1 =
expand(contextDict, cond1);
199 token cond2(
operator[](2));
200 cond2 =
expand(contextDict, cond2);
202 const bool equal = equalToken(cond1, cond2);
209 bool ok = ifeqEntry::execute(
equal, stack, contextDict, context, is);
211 if (stack.
size() != nNested)
214 <<
"Did not find matching #endif for "
215 <<
typeName <<
" condition starting"
216 <<
" at line " << stack.
last().second()
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
T remove()
Remove and return the top element.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
label lineNumber() const
Return current stream line number.
virtual const fileName & name() const
Return the name of the stream.
Input from memory buffer stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool eof() const
Return true if end of input seen.
void size(const label)
Override size to be inconsistent with allocated storage.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A 2-tuple for storing two objects of different types.
T & last()
Return the last element of the list.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Conditional parsing of and within dictionary entries.
static bool insert(const dictionary &parentDict, dictionary &contextDict, const token &t, Istream &is)
Read entry starting from token t and insert into contextDict.
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
A token holds items read from Istream.
const functionName & functionNameToken() const
bool isFunctionName() const
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool equal(const T &s1, const T &s2)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
void evaluate(GeometricField< Type, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, GeoMesh > &x)
string expand(const string &s, string::size_type &index, const dictionary &dict, const bool allowEnvVars, const bool allowEmpty)