15#pragma warning(disable : 4800)
46template <
class MatchFuncArgType,
class DataFuncArgType = MatchFuncArgType,
47 bool needsConversion =
false>
99 void setDataFunc(std::function<MatchFuncArgType(DataFuncArgType)> what) {
103 std::function<MatchFuncArgType(DataFuncArgType)>
getDataFunc()
const {
115 virtual bool Match(
const DataFuncArgType arg)
const {
121 tRes =
static_cast<bool>(mfArg);
176 MatchFuncArgType mfArg;
178 std::is_same<MatchFuncArgType, DataFuncArgType>::value) {
190 MatchFuncArgType mfArg;
201template <
class T1,
class T2>
202int queryCmp(
const T1 v1,
const T2 v2,
const T1 tol) {
#define PRECONDITION(expr, mess)
class to allow integer values to pick templates
MatchFuncArgType TypeConvert(DataFuncArgType what, Int2Type< true >) const
const std::string & getTypeLabel() const
returns our text label.
virtual std::string getFullDescription() const
returns a fuller text description
virtual bool Match(const DataFuncArgType arg) const
returns whether or not we match the argument
int TypeConvert(int what, Int2Type< false >) const
void addChild(CHILD_TYPE child)
adds a child to our list of children
void setDescription(const char *descr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::function< int(Atom const *)> d_dataFunc
CHILD_VECT_CI endChildren() const
returns an iterator for the end of our child vector
CHILD_VECT_CI beginChildren() const
returns an iterator for the beginning of our child vector
void setTypeLabel(const std::string &typ)
sets our type label
std::vector< CHILD_TYPE > CHILD_VECT
Atom const * DATA_FUNC_ARG_TYPE
void setDataFunc(std::function< MatchFuncArgType(DataFuncArgType)> what)
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
virtual Query< MatchFuncArgType, DataFuncArgType, needsConversion > * copy() const
returns a copy of this Query
void setMatchFunc(std::function< bool(MatchFuncArgType)> what)
sets our match function
const std::string & getDescription() const
returns our text description
typename CHILD_VECT::const_iterator CHILD_VECT_CI
std::function< bool(MatchFuncArgType)> getMatchFunc() const
returns our match function:
std::function< bool(int)> d_matchFunc
void setTypeLabel(const char *typ)
This is an overloaded member function, provided for convenience. It differs from the above function o...
typename CHILD_VECT::iterator CHILD_VECT_I
std::function< MatchFuncArgType(DataFuncArgType)> getDataFunc() const
returns our data function:
std::function< int(int)> d_dataFuncSameType
std::shared_ptr< Query< int, Atom const *, needsConversion > > CHILD_TYPE
void setDescription(const std::string &descr)
sets our text description
std::string d_description
#define RDKIT_QUERY_EXPORT
int queryCmp(const T1 v1, const T2 v2, const T1 tol)