11 #ifndef RD_LESSEQUALQUERY_H
12 #define RD_LESSEQUALQUERY_H
19 template <
class MatchFuncArgType,
class DataFuncArgType = MatchFuncArgType,
20 bool needsConversion =
false>
22 :
public EqualityQuery<MatchFuncArgType, DataFuncArgType, needsConversion> {
29 this->df_negate =
false;
35 this->df_negate =
false;
38 bool Match(
const DataFuncArgType what)
const override {
39 MatchFuncArgType mfArg =
41 if (
queryCmp(this->d_val, mfArg, this->d_tol) <= 0) {
42 if (this->getNegation())
47 if (this->getNegation())
69 std::ostringstream res;
70 res << this->getDescription();
71 res <<
" " << this->d_val;
72 if (this->getNegation())
a Query implementing ==: arguments must match a particular value (within an optional tolerance)
void setTol(MatchFuncArgType what)
sets our tolerance
void setVal(MatchFuncArgType what)
sets our target value
class to allow integer values to pick templates
a Query implementing <= using a particular value (and an optional tolerance)
std::string getFullDescription() const override
returns a fuller text description
bool Match(const DataFuncArgType what) const override
returns whether or not we match the argument
LessEqualQuery(DataFuncArgType what)
constructs with our target value
LessEqualQuery(DataFuncArgType v, DataFuncArgType t)
constructs with our target value and a tolerance
Query< MatchFuncArgType, DataFuncArgType, needsConversion > * copy() const override
returns a copy of this Query
Base class for all queries.
void setDataFunc(MatchFuncArgType(*what)(DataFuncArgType))
sets our data function
void setNegation(bool what)
sets whether or not we are negated
std::string d_description
#define RDKIT_QUERY_EXPORT
int queryCmp(const T1 v1, const T2 v2, const T1 tol)