39 const std::string& str,
53 pos = trimPoints.first;
54 len = (trimPoints.second - trimPoints.first);
67 result = std::move(driver.
result());
73 <<
"Failed evaluation: " 74 << str.substr(
pos, len) <<
nl;
80 if (result.
size() <= 1)
95 const std::string& str,
bool hasValue() const
Has a value?
void writeValue(Ostream &os) const
Write the single value, or the first value from field.
messageStream InfoErr
Information stream (stderr output on master, null elsewhere)
Input/output from string buffers.
A polymorphic field/result from evaluating an expression.
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.
constexpr char nl
The newline '\n' character (0x0a)
dimensionedScalar pos(const dimensionedScalar &ds)
void writeField(Ostream &os, const word &keyword="") const
Write the field, optionally as an entry.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
const exprResult & result() const noexcept
Const access to expression result.
OBJstream os(runTime.globalPath()/outputName)
Driver for generic primitive field expressions.
label size() const
The field or object size.
virtual unsigned parse(const std::string &expr, size_t pos=0, size_t len=std::string::npos)
Execute the parser.
String expression evaluation.
A class for handling character strings derived from std::string.
Output to string buffer, using a OSstream. Always UNCOMPRESSED.