11#ifndef RD_EQUALITYQUERY_H
12#define RD_EQUALITYQUERY_H
20template <
typename MatchFuncArgType,
21 typename DataFuncArgType = MatchFuncArgType,
22 bool needsConversion =
false>
24 :
public Query<MatchFuncArgType, DataFuncArgType, needsConversion> {
51 bool Match(
const DataFuncArgType what)
const override {
52 MatchFuncArgType mfArg =
75 std::ostringstream res;
77 res <<
" " << this->
d_val;
const MatchFuncArgType getVal() const
returns our target value
Query< MatchFuncArgType, DataFuncArgType, needsConversion > * copy() const override
returns a copy of this Query
EqualityQuery(MatchFuncArgType v)
constructs with our target value
bool Match(const DataFuncArgType what) const override
EqualityQuery(MatchFuncArgType v, MatchFuncArgType t)
constructs with our target value and a tolerance
void setTol(MatchFuncArgType what)
sets our tolerance
void setVal(MatchFuncArgType what)
sets our target value
const MatchFuncArgType getTol() const
returns out tolerance
std::string getFullDescription() const override
returns a fuller text description
class to allow integer values to pick templates
MatchFuncArgType(* d_dataFunc)(DataFuncArgType)
MatchFuncArgType TypeConvert(MatchFuncArgType what, Int2Type< false >) const
calls our dataFunc (if it's set) on what and returns the result, otherwise returns what
void setDataFunc(MatchFuncArgType(*what)(DataFuncArgType))
sets our data function
bool getNegation() const
returns whether or not we are negated
void setNegation(bool what)
sets whether or not we are negated
const std::string & getDescription() const
returns our text description
std::string d_description
#define RDKIT_QUERY_EXPORT
int queryCmp(const T1 v1, const T2 v2, const T1 tol)