55 : _op(oper), _b_func(0), _bt_func(0), _argc(0), _arg1(a1), _args(rv)
61 : _op(0), _b_func(func), _bt_func(0), _argc(0), _arg1(0), _args(rv)
66 _argc = _args->size();
72 : _op(0), _b_func(0), _bt_func(func), _argc(0), _arg1(0), _args(rv)
77 _argc = _args->size();
82 Clause::Clause() : _op(0), _b_func(0), _bt_func(0), _argc(0), _arg1(0), _args(0)
94 delete _arg1; _arg1 = 0;
100 for_each(_args->begin(), _args->end(), delete_rvalue);
101 delete _args; _args = 0;
114 bool relational = (_op && !_b_func && !_bt_func);
116 bool boolean = (!_op && _b_func && !_bt_func);
118 bool basetype = (!_op && !_b_func && _bt_func);
121 return _arg1 && _args;
122 else if (
boolean || basetype)
134 return _op || _b_func;
143 return (_bt_func != 0);
160 assert(_op || _b_func);
170 i != _args->end() && !result;
172 result = result || btp->
ops((*i)->bvalue(dds), _op);
181 (*_b_func)(_argc, argv, dds, &result);
189 "A selection expression must contain only boolean clauses.");
217 (*_bt_func)(_argc, argv, dds,
value);
235 (*value)->set_send_p(
true);
236 (*value)->set_read_p(
true);
245 "Clause::value() was called in a context expecting a BaseType pointer return, but the Clause was boolean-valued instead.");
BaseType * bvalue(DDS &dds)
std::vector< rvalue * > rvalue_list
std::vector< rvalue * >::iterator rvalue_list_iter
A class for software fault reporting.
bool value(DDS &dds)
Evaluate a clause which returns a boolean value This method must only be evaluated for clauses with r...
BaseType ** build_btp_args(rvalue_list *args, DDS &dds)
The basic data type for the DODS DAP types.
virtual bool ops(BaseType *b, int op)
Evaluate relational operators.
bool OK()
Checks the "representation invariant" of a clause.
bool value_clause()
Return true if the clause returns a value in a BaseType pointer.
bool boolean_clause()
Return true if the clause returns a boolean value.