1#ifndef OPAL_SDeferred_HH
2#define OPAL_SDeferred_HH
60 virtual void print(std::ostream&)
const;
80 :
SValue<
T>(), expr_ptr(rhs.expr_ptr->clone()), in_evaluation(false) {}
84 :
SValue<
T>(), expr_ptr(expr), in_evaluation(false) {}
97 throw LogicalError(
"SDeferred::evaluate()",
"Recursive expression definitions found.");
101 this->value = expr_ptr->evaluate();
102 in_evaluation =
false;
104 in_evaluation =
false;
107 "Evaluating expression \"" + this->getImage() +
"\": " + ex.
what());
108 }
catch (std::exception& ex) {
109 in_evaluation =
false;
111 "SDeferred::evaluate()",
"Standard C++ exception while evaluating \""
112 + this->getImage() +
"\": " + ex.
what());
114 in_evaluation =
false;
116 "SDeferred::evaluate()",
117 "Unknown exception while evaluating \"" + this->getImage() +
"\": ");
131 expr_ptr->print(stream, 0);
A pointer to a scalar expression.
Object attribute with a `‘deferred’' scalar value.
virtual T evaluate()
Evaluate.
virtual SDeferred< T > * clone() const
Make clone.
PtrToScalar< T > expr_ptr
Pointer to expression.
void operator=(const SDeferred< T > &)
virtual void print(std::ostream &) const
Print the attribute value.
virtual bool isExpression() const
Return expression flag.
Object attribute with a constant scalar value.
virtual const std::string & what() const
Return the message string for the exception.
virtual const std::string & where() const
Return the name of the method or function which detected the exception.
Representation objects and parsers for attribute expressions.