1 #ifndef OPAL_SDeferred_HH
2 #define OPAL_SDeferred_HH
62 virtual void print(std::ostream &)
const;
85 SValue<
T>(), expr_ptr(rhs.expr_ptr->clone()), in_evaluation(false)
91 SValue<
T>(), expr_ptr(expr), in_evaluation(false)
110 "Recursive expression definitions found.");
112 in_evaluation =
true;
114 this->value = expr_ptr->evaluate();
115 in_evaluation =
false;
117 in_evaluation =
false;
119 "Evaluating expression \"" +
120 this->getImage() +
"\": " + ex.
what());
122 in_evaluation =
false;
124 "Evaluating expression \"" +
125 this->getImage() +
"\": " + ex.
what());
126 }
catch(std::exception &ex) {
127 in_evaluation =
false;
129 "Standard C++ exception while evaluating \"" +
130 this->getImage() +
"\": " + ex.
what());
132 in_evaluation =
false;
134 "Unknown exception while evaluating \"" +
135 this->getImage() +
"\": ");
151 expr_ptr->print(stream, 0);
Representation objects and parsers for attribute expressions.
A pointer to a scalar expression.
The abstract base class for all exceptions in CLASSIC.
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.
The base class for all OPAL exceptions.
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.