11 #ifndef _RD_QUERYATOM_H_
12 #define _RD_QUERYATOM_H_
50 dp_query = other.dp_query->
copy();
53 if (
this == &other)
return *
this;
56 dp_query = other.dp_query->
copy();
65 bool hasQuery()
const {
return dp_query !=
nullptr; };
94 bool maintainOrder =
true);
109 std::string res =
"";
111 for (
unsigned int i = 0; i < depth; ++i) res +=
" ";
115 res +=
qhelper((*ci).get(), depth + 1);
123 std::string res =
"";
Defines the Atom class and associated typedefs.
#define PRECONDITION(expr, mess)
Pulls in all the query types.
Base class for all queries.
virtual std::string getFullDescription() const
returns a fuller text description
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
virtual Query< MatchFuncArgType, DataFuncArgType, needsConversion > * copy() const
returns a copy of this Query
CHILD_VECT::const_iterator CHILD_VECT_CI
The class for representing atoms.
Atom & operator=(const Atom &other)
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
virtual QUERYATOM_QUERY * getQuery() const
NOT CALLABLE.
virtual bool hasQuery() const
int getFormalCharge() const
returns the formal charge of this atom
unsigned int getIsotope() const
returns our isotope number
Class for storing atomic queries.
void setQuery(QUERYATOM_QUERY *what)
replaces our current query with the value passed in
Atom * copy() const
returns a copy of this query, owned by the caller
void expandQuery(QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
expands our current query
bool Match(Atom const *what) const
returns true if we match Atom what
bool QueryMatch(QueryAtom const *what) const
returns true if our query details match those of QueryAtom what
QUERYATOM_QUERY * getQuery() const
returns our current query
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
QueryAtom & operator=(const QueryAtom &other)
QueryAtom(const QueryAtom &other)
QueryAtom(const Atom &other)
#define RDKIT_GRAPHMOL_EXPORT
std::string qhelper(Atom::QUERYATOM_QUERY *q, unsigned int depth)
T * makeAtomFormalChargeQuery(int what, const std::string &descr)
returns a Query for matching formal charge
std::string describeQuery(const Atom *atom)
T * makeAtomIsotopeQuery(int what, const std::string &descr)
returns a Query for matching atoms with a particular isotope
T * makeAtomNumQuery(int what, const std::string &descr)
returns a Query for matching atomic number
T * makeAtomNumRadicalElectronsQuery(int what, const std::string &descr)
returns a Query for matching the number of radical electrons