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 =
67 std::ostringstream res;
69 res <<
" " << this->
d_val;
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)
LessQuery(DataFuncArgType v, DataFuncArgType t)
constructs with our target value and a tolerance
bool Match(const DataFuncArgType what) const
returns whether or not we match the argument
Query< MatchFuncArgType, DataFuncArgType, needsConversion > * copy() const
returns a copy of this Query
std::string getFullDescription() const
returns a fuller text description
LessQuery(DataFuncArgType v)
constructs with our target value
Base class for all queries.
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
const std::string & getDescription() const
returns our text description
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
std::string d_description
int queryCmp(const T1 v1, const T2 v2, const T1 tol)