#include <Query.h>

Public Types | |
| typedef boost::shared_ptr < Query< MatchFuncArgType, DataFuncArgType, needsConversion > > | CHILD_TYPE |
| typedef std::vector< CHILD_TYPE > | CHILD_VECT |
| typedef CHILD_VECT::iterator | CHILD_VECT_I |
| typedef CHILD_VECT::const_iterator | CHILD_VECT_CI |
Public Member Functions | |
| Query () | |
| virtual | ~Query () |
| void | setNegation (bool what) |
| sets whether or not we are negated | |
| bool | getNegation () const |
| returns whether or not we are negated | |
| void | setDescription (std::string &descr) |
| sets our text description | |
| void | setDescription (const char *descr) |
| std::string | getDescription () const |
| returns our text description | |
| void | setMatchFunc (bool(*what)(MatchFuncArgType)) |
| sets our match function | |
| bool(* | getMatchFunc () const)(MatchFuncArgType) |
| returns our match function: | |
| void | setDataFunc (MatchFuncArgType(*what)(DataFuncArgType)) |
| sets our data function | |
| MatchFuncArgType(* | getDataFunc () const)(DataFuncArgType) |
| returns our data function: | |
| void | addChild (CHILD_TYPE child) |
| adds a child to our list of children | |
| CHILD_VECT_CI | beginChildren () const |
| returns an iterator for the beginning of our child vector | |
| CHILD_VECT_CI | endChildren () const |
| returns an iterator for the end of our child vector | |
| virtual bool | Match (const DataFuncArgType arg) const |
| returns whether or not we match the argument | |
| virtual Query < MatchFuncArgType, DataFuncArgType, needsConversion > * | copy () const |
| returns a copy of this Query | |
Protected Member Functions | |
| MatchFuncArgType | TypeConvert (MatchFuncArgType what, Int2Type< false > d) const |
calls our dataFunc (if it's set) on what and returns the result, otherwise returns what | |
| MatchFuncArgType | TypeConvert (DataFuncArgType what, Int2Type< true > d) const |
calls our dataFunc (which must be set) on what and returns the result | |
Protected Attributes | |
| std::string | d_description |
| CHILD_VECT | d_children |
| bool | df_negate |
| bool(* | d_matchFunc )(MatchFuncArgType) |
| MatchFuncArgType(* | d_dataFunc )(DataFuncArgType) |
Query objects have one or two functions associated with them:
bool matchFunc(MatchFuncArgType other) returns true or false to indicate whether this query matches other. This is mandatory.
MatchFuncArgType dataFunc(DataFuncArgType other) converts the argument other from DataFuncArgType to MatchFuncArgType. This is optional if DataFuncArgType is the same as (or implicitly convertible to) MatchFuncArgType. Definition at line 42 of file Query.h.
| typedef boost::shared_ptr< Query<MatchFuncArgType, DataFuncArgType, needsConversion> > Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_TYPE |
| typedef std::vector< CHILD_TYPE > Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_VECT |
| typedef CHILD_VECT::iterator Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_VECT_I |
| typedef CHILD_VECT::const_iterator Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::CHILD_VECT_CI |
| Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::Query | ( | ) | [inline] |
| virtual Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::~Query | ( | ) | [inline, virtual] |
| void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setNegation | ( | bool | what | ) | [inline] |
sets whether or not we are negated
Definition at line 54 of file Query.h.
Referenced by Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::SetQuery< const int, RDKit::Atom *, true >::copy(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), RDKit::RecursiveStructureQuery::copy(), RDKit::AtomRingQuery::copy(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::EqualityQuery< int, Atom const *, true >::copy(), and Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy().
| bool Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getNegation | ( | ) | const [inline] |
returns whether or not we are negated
Definition at line 56 of file Query.h.
Referenced by Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::SetQuery< const int, RDKit::Atom *, true >::copy(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), RDKit::RecursiveStructureQuery::copy(), RDKit::AtomRingQuery::copy(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::EqualityQuery< int, Atom const *, true >::copy(), Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::SetQuery< const int, RDKit::Atom *, true >::Match(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), RDKit::AtomRingQuery::Match(), Queries::Query< const int, Atom *, needsConversion >::Match(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::EqualityQuery< int, Atom const *, true >::Match(), and Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match().
| void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setDescription | ( | std::string & | descr | ) | [inline] |
sets our text description
Definition at line 59 of file Query.h.
Referenced by RDKit::AtomRingQuery::AtomRingQuery(), and RDKit::RecursiveStructureQuery::RecursiveStructureQuery().
| void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setDescription | ( | const char * | descr | ) | [inline] |
| std::string Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getDescription | ( | ) | const [inline] |
| void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setMatchFunc | ( | bool(*)(MatchFuncArgType) | what | ) | [inline] |
| bool(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getMatchFunc | ( | ) | [inline] |
| void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::setDataFunc | ( | MatchFuncArgType(*)(DataFuncArgType) | what | ) | [inline] |
sets our data function
Definition at line 70 of file Query.h.
Referenced by RDKit::AtomRingQuery::AtomRingQuery(), Queries::SetQuery< const int, RDKit::Atom *, true >::copy(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::EqualityQuery< int, Atom const *, true >::copy(), and RDKit::RecursiveStructureQuery::RecursiveStructureQuery().
| MatchFuncArgType(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::getDataFunc | ( | ) | [inline] |
| void Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::addChild | ( | CHILD_TYPE | child | ) | [inline] |
adds a child to our list of children
Definition at line 75 of file Query.h.
Referenced by Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::Query< const int, Atom *, needsConversion >::copy(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), and Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy().
| CHILD_VECT_CI Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::beginChildren | ( | ) | const [inline] |
returns an iterator for the beginning of our child vector
Definition at line 77 of file Query.h.
Referenced by Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::Query< const int, Atom *, needsConversion >::copy(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), and Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match().
| CHILD_VECT_CI Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::endChildren | ( | ) | const [inline] |
returns an iterator for the end of our child vector
Definition at line 79 of file Query.h.
Referenced by Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::Query< const int, Atom *, needsConversion >::copy(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), and Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match().
| virtual bool Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::Match | ( | const DataFuncArgType | arg | ) | const [inline, virtual] |
returns whether or not we match the argument
Reimplemented in Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::EqualityQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::SetQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, and Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >.
| virtual Query<MatchFuncArgType,DataFuncArgType,needsConversion>* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::copy | ( | ) | const [inline, virtual] |
returns a copy of this Query
Notes:
deleteing the result Reimplemented in RDKit::AtomRingQuery, RDKit::RecursiveStructureQuery, Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::EqualityQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::SetQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >, Queries::EqualityQuery< int, Atom const *, true >, and Queries::SetQuery< const int, RDKit::Atom *, true >.
| MatchFuncArgType Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::TypeConvert | ( | MatchFuncArgType | what, | |
| Int2Type< false > | d | |||
| ) | const [inline, protected] |
calls our dataFunc (if it's set) on what and returns the result, otherwise returns what
Definition at line 123 of file Query.h.
Referenced by Queries::SetQuery< const int, RDKit::Atom *, true >::Match(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), RDKit::AtomRingQuery::Match(), Queries::Query< const int, Atom *, needsConversion >::Match(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::Match(), and Queries::EqualityQuery< int, Atom const *, true >::Match().
| MatchFuncArgType Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::TypeConvert | ( | DataFuncArgType | what, | |
| Int2Type< true > | d | |||
| ) | const [inline, protected] |
std::string Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_description [protected] |
Definition at line 112 of file Query.h.
Referenced by Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::SetQuery< const int, RDKit::Atom *, true >::copy(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), RDKit::RecursiveStructureQuery::copy(), RDKit::AtomRingQuery::copy(), Queries::Query< const int, Atom *, needsConversion >::copy(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::EqualityQuery< int, Atom const *, true >::copy(), Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::Query< const int, Atom *, needsConversion >::getDescription(), and Queries::Query< const int, Atom *, needsConversion >::setDescription().
CHILD_VECT Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_children [protected] |
Definition at line 116 of file Query.h.
Referenced by Queries::Query< const int, Atom *, needsConversion >::addChild(), Queries::Query< const int, Atom *, needsConversion >::beginChildren(), Queries::Query< const int, Atom *, needsConversion >::endChildren(), and Queries::Query< const int, Atom *, needsConversion >::~Query().
bool Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::df_negate [protected] |
Definition at line 117 of file Query.h.
Referenced by Queries::AndQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::AndQuery(), Queries::Query< const int, Atom *, needsConversion >::copy(), Queries::EqualityQuery< int, Atom const *, true >::EqualityQuery(), Queries::Query< const int, Atom *, needsConversion >::getNegation(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::GreaterEqualQuery(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::GreaterQuery(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::LessEqualQuery(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::LessQuery(), Queries::OrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::OrQuery(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::RangeQuery(), Queries::Query< const int, Atom *, needsConversion >::setNegation(), and Queries::XOrQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::XOrQuery().
bool(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_matchFunc)(MatchFuncArgType) [protected] |
MatchFuncArgType(* Queries::Query< MatchFuncArgType, DataFuncArgType, needsConversion >::d_dataFunc)(DataFuncArgType) [protected] |
Referenced by Queries::SetQuery< const int, RDKit::Atom *, true >::copy(), Queries::RangeQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), RDKit::AtomRingQuery::copy(), Queries::Query< const int, Atom *, needsConversion >::copy(), Queries::LessQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::LessEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::GreaterEqualQuery< MatchFuncArgType, DataFuncArgType, needsConversion >::copy(), Queries::EqualityQuery< int, Atom const *, true >::copy(), Queries::Query< const int, Atom *, needsConversion >::getDataFunc(), Queries::Query< const int, Atom *, needsConversion >::setDataFunc(), and Queries::Query< const int, Atom *, needsConversion >::TypeConvert().
1.5.5