38 #include "D4FilterClause.h" 45 D4FilterClauseList::m_duplicate(
const D4FilterClauseList &src)
49 for (D4FilterClauseList::citer i = src.cbegin(), e = src.cend(); i != e; ++i) {
50 D4FilterClause *fc = *i;
51 d_clauses.push_back(
new D4FilterClause(*fc));
55 D4FilterClauseList::~D4FilterClauseList()
57 for (D4FilterClauseList::iter i = d_clauses.begin(), e = d_clauses.end(); i != e; ++i) {
74 D4FilterClauseList::value(
DMR &dmr)
76 for (D4FilterClauseList::iter i = d_clauses.begin(), e = d_clauses.end(); i != e; ++i) {
77 if ((*i)->value(dmr) ==
false)
95 D4FilterClauseList::value()
97 for (D4FilterClauseList::iter i = d_clauses.begin(), e = d_clauses.end(); i != e; ++i) {
98 if ((*i)->value() ==
false)
116 case D4RValue::basetype:
119 case D4RValue::constant:
120 d_arg1 =
new D4RValue(*(rhs.d_arg1));
123 throw Error(malformed_expr,
"found a filter clause with a function call.");
127 case D4RValue::basetype:
130 case D4RValue::constant:
131 d_arg2 =
new D4RValue(*(rhs.d_arg2));
134 throw Error(malformed_expr,
"found a filter clause with a function call.");
146 bool D4FilterClause::value(
DMR &dmr)
150 throw InternalErr(__FILE__, __LINE__,
"While evaluating a constraint filter clause: Found a null operator");
159 return cmp(d_op, d_arg1->value(dmr), d_arg2->value(dmr));
163 throw InternalErr(__FILE__, __LINE__,
"While evaluating a constraint filter clause: Filter operator not implemented");
166 throw InternalErr(__FILE__, __LINE__,
"While evaluating a constraint filter clause: Unrecognized operator");
177 bool D4FilterClause::value()
181 throw InternalErr(__FILE__, __LINE__,
"While evaluating a constraint filter clause: Found a null operator");
190 return cmp(d_op, d_arg1->value(), d_arg2->value());
194 throw InternalErr(__FILE__, __LINE__,
"While evaluating a constraint filter clause: Filter operator not implemented");
197 throw InternalErr(__FILE__, __LINE__,
"While evaluating a constraint filter clause: Unrecognized operator");
209 return arg1->
d4_ops(arg2, op);
virtual bool d4_ops(BaseType *b, int op)
Evaluator a relop for DAP4.
top level DAP object to house generic methods
A class for software fault reporting.
The basic data type for the DODS DAP types.
A class for error processing.
value_kind get_kind() const
What kind of thing holds the value Values in DAP4 constraints are either constants, dataset variables or function results. It might be nice to know the source of a given value in order to optimize the evaluation of certain kinds of expressions.