11#ifndef _RD_QUERYBOND_H
12#define _RD_QUERYBOND_H
40 dp_query = other.dp_query->copy();
46 dp_query = std::move(other.dp_query);
52 QueryBond::operator=(std::move(other));
53 dp_query = std::move(other.dp_query);
76 bool hasQuery()
const override {
return dp_query !=
nullptr; }
107 bool maintainOrder =
true)
override;
124 for (
unsigned int i = 0; i < depth; ++i) {
128 for (
const auto &child :
130 res +=
qhelper(child.get(), depth + 1);
138 std::string res =
"";
#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
The class for representing atoms.
class for representing a bond
virtual QUERYBOND_QUERY * getQuery() const
NOT CALLABLE.
virtual bool hasQuery() const
BondDir
the bond's direction (for chirality)
Class for storing Bond queries.
void setBondDir(BondDir bD)
sets the BondDir of this query:
void setBondType(BondType bT)
sets the BondType of this query:
QueryBond(BondType bT)
initialize with a particular bond order
bool hasQuery() const override
void expandQuery(QUERYBOND_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true) override
expands our current query
QUERYBOND_QUERY * getQuery() const override
returns our current query
QueryBond(const Bond &other)
initialize from a bond
void setQuery(QUERYBOND_QUERY *what) override
replaces our current query with the value passed in
Bond * copy() const override
returns a copy of this query, owned by the caller
double getValenceContrib(const Atom *at) const override
returns our contribution to the explicit valence of an Atom
QueryBond(const QueryBond &other)
QueryBond(QueryBond &&other) noexcept
bool QueryMatch(QueryBond const *what) const
returns true if our query details match those of QueryBond what
Queries::Query< int, Bond const *, true > QUERYBOND_QUERY
QUERYBOND_QUERY * dp_query
bool Match(Bond const *what) const override
returns true if we match Bond what
QueryBond & operator=(const QueryBond &other)
QueryBond & operator=(QueryBond &&other) noexcept
#define RDKIT_GRAPHMOL_EXPORT
std::string qhelper(const Atom::QUERYATOM_QUERY *q, unsigned int depth)
RDKIT_GRAPHMOL_EXPORT BOND_EQUALS_QUERY * makeBondOrderEqualsQuery(Bond::BondType what)
returns a Query for matching bond orders
std::string describeQuery(const Atom *atom)