Go to the documentation of this file.
38 const std::string& str,
47 pos = trimPoints.first;
48 len = (trimPoints.second - trimPoints.first);
61 result = std::move(driver.
result());
67 <<
"Failed evaluation: "
68 << str.substr(
pos, len) <<
nl;
String expression evaluation.
label size() const
The field or object size.
Driver for generic primitive field expressions.
Input/output from string buffers.
A class for handling character strings derived from std::string.
messageStream InfoErr
Information stream (uses stderr - output is on the master only)
A polymorphic field/result from evaluating an expression.
void writeValue(Ostream &os) const
Write the single value, or the first value from field.
std::pair< size_t, size_t > findTrim(const std::string &s, size_t pos=0, size_t len=std::string::npos)
Find (first, last) non-space locations in string or sub-string.
bool hasValue() const
Has a value?
Foam::string str() const
Get the string - as Foam::string rather than std::string.
Output to string buffer, using a OSstream.
virtual const exprResult & result() const
Const access to expression result.
virtual unsigned parse(const std::string &expr, size_t pos=0, size_t len=std::string::npos)
Execute the parser.
string evaluate(const std::string &s, size_t pos=0, size_t len=std::string::npos)
dimensionedScalar pos(const dimensionedScalar &ds)