80 result.setSingleValue(val);
109 return result_.getUniform(1,
true).cref<Type>().first();
158 return (searchCtrl_ & searchControls::CACHE_READ_FIELDS);
bool searchFiles() const noexcept
bool cacheReadFields() const noexcept
bool debugParser() const noexcept
Read access to parser debug.
exprResult result_
The result.
virtual exprResult & variable(const word &name)
Non-const access to the named variable (sub-classes only).
bool searchRegistry() const noexcept
bool debugParser_
Request debugging for parser.
@ SEARCH_REGISTRY
Search registry before disk.
@ SEARCH_FILES
Search disk (eg, standalone app).
@ CACHE_READ_FIELDS
Cache fields read from disk.
tmp< Field< Type > > evaluate(const expressions::exprString &expr, bool wantPointData=false)
Evaluate the expression and return the field.
bool debugScanner_
Request debugging for scanner.
bool debugScanner() const noexcept
Read access to scanner debug.
Type evaluateUniform(const expressions::exprString &expr, bool wantPointData=false)
Evaluate the expression and return a single value.
HashTable< exprResult > variables_
The variables table.
searchControls searchCtrl_
Registry/disk/caching control.
scalar argValue() const noexcept
Get special-purpose scalar reference argument.
int resetStashedTokenId(int tokenId=0) const noexcept
Reset "look-behind" parsing context (mutable operation).
void setArgument(const scalar val) noexcept
Set special-purpose scalar reference argument.
const exprResult & result() const noexcept
Const access to expression result.
int stashedTokenId() const noexcept
Get "look-behind" parsing context (internal bookkeeping).
virtual bool hasVariable(const word &name) const
True if named variable exists.
virtual unsigned parse(const std::string &expr, size_t pos=0, size_t len=std::string::npos)=0
Execute the parser.
tmp< Field< Type > > getResult(bool wantPointData=false)
Return the expression result as a tmp field.
int stashedTokenId_
Internal bookkeeping as "look-behind" parsing context.
void addUniformVariable(const word &name, const T &val)
Add a uniform variable from an outside caller.
scalar arg1Value_
Special-purpose scalar reference argument.
A polymorphic field/result from evaluating an expression.
A variant of Foam::string with expansion of dictionary variables into a comma-separated form.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.