#include <Clause.h>
Collaboration diagram for Clause:
Public Member Functions | |
bool | boolean_clause () |
Return true if the clause returns a boolean value. | |
Clause () | |
Clause (btp_func func, rvalue_list *rv) | |
Clause (bool_func func, rvalue_list *rv) | |
Clause (const int oper, rvalue *a1, rvalue_list *rv) | |
bool | OK () |
Checks the "representation invariant" of a clause. | |
bool | value (const string &dataset, DDS &dds, BaseType **value) |
Evaluate a clause that returns a value via a BaseType pointer. This method must only be evaluated for clauses with relational expressions or boolean functions. | |
bool | value (const string &dataset, DDS &dds) |
Evaluate a clause which returns a boolean value This method must only be evaluated for clauses with relational expressions or boolean functions. | |
bool | value_clause () |
Return true if the clause returns a value in a BaseType pointer. | |
virtual | ~Clause () |
Each clause object can contain a representation of one of three possible forms:
a > b
.
find(A,L)
might return TRUE if A is a member of L (if the find()
function is defined).
sig0()
might be included in the constraint expression parser to calculate density from pressure, temperature, and salinity. In this case, sig0(p,t,s)
would be a clause that evaluates to a data value.
This might be a bit confusing; in the first, and by far more common, form of constraint expressions (CEs) only the first two types of clauses may appear. In the second form of the CE only the last type of clause may occur. The Clause class, however, can store them all.
The Clause object holds the constraint expression after it has been parsed. The parser renders the relational operator into an integer, and the functions into pointers.
Definition at line 87 of file Clause.h.
Clause::Clause | ( | const int | oper, | |
rvalue * | a1, | |||
rvalue_list * | rv | |||
) |
Clause::Clause | ( | bool_func | func, | |
rvalue_list * | rv | |||
) |
Clause::Clause | ( | btp_func | func, | |
rvalue_list * | rv | |||
) |
bool Clause::boolean_clause | ( | ) |
bool Clause::OK | ( | ) |
Definition at line 101 of file Clause.cc.
Referenced by boolean_clause(), Clause(), value(), and value_clause().
dataset | This is passed to the function. | |
dds | Use variables from this DDS when evaluating the expression | |
value | A value-result parameter |
InternalErr | if called for a clause that returns a boolean value. Not that this method itself does return a boolean value. |
Definition at line 197 of file Clause.cc.
References build_btp_args(), OK(), and value().
Here is the call graph for this function:
bool Clause::value | ( | const string & | dataset, | |
DDS & | dds | |||
) |
dataset | This is passed to the rvalue::bvalue() method. | |
dds | Use variables from this DDS when evaluating the expression |
InternalErr | if called for a clause that returns a BaseType pointer. |
Definition at line 148 of file Clause.cc.
References build_btp_args(), rvalue::bvalue(), OK(), and BaseType::ops().
Referenced by ConstraintEvaluator::eval_function(), and value().
Here is the call graph for this function:
bool Clause::value_clause | ( | ) |
Definition at line 131 of file Clause.cc.
References OK().
Referenced by ConstraintEvaluator::functional_expression().
Here is the call graph for this function: