 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
11 #ifndef __RD_LESSQUERY_H__
12 #define __RD_LESSQUERY_H__
19 template <
class MatchFuncArgType,
class DataFuncArgType = MatchFuncArgType,
20 bool needsConversion =
false>
22 :
public EqualityQuery<MatchFuncArgType, DataFuncArgType, needsConversion> {
38 bool Match(
const DataFuncArgType what)
const {
39 MatchFuncArgType mfArg =
66 std::ostringstream res;
68 res <<
" " << this->
d_val;
Query< MatchFuncArgType, DataFuncArgType, needsConversion > * copy() const
void setVal(MatchFuncArgType what)
sets our target value
void setNegation(bool what)
sets whether or not we are negated
int queryCmp(const T1 v1, const T2 v2, const T1 tol)
MatchFuncArgType(* d_dataFunc)(MatchFuncArgType)
LessQuery(DataFuncArgType v)
constructs with our target value
bool Match(const DataFuncArgType what) const
std::string d_description
void setDataFunc(MatchFuncArgType(*what)(MatchFuncArgType))
sets our data function
bool getNegation() const
returns whether or not we are negated
class to allow integer values to pick templates
a Query implementing < using a particular value (and an optional tolerance)
MatchFuncArgType TypeConvert(MatchFuncArgType what, Int2Type< false >) const
calls our dataFunc (if it's set) on what and returns the result, otherwise returns what
void setTol(MatchFuncArgType what)
sets our tolerance
Base class for all queries.
LessQuery(DataFuncArgType v, DataFuncArgType t)
constructs with our target value and a tolerance
const std::string & getDescription() const
returns our text description
std::string getFullDescription() const
a Query implementing ==: arguments must match a particular value (within an optional tolerance)