52 dp_query = other.dp_query->
copy();
61 Atom::operator=(other);
64 dp_query = other.dp_query->
copy();
72 dp_query = std::exchange(other.dp_query,
nullptr);
78 QueryAtom::operator=(std::move(other));
79 dp_query = std::exchange(other.dp_query,
nullptr);
89 bool hasQuery()
const override {
return dp_query !=
nullptr; }
92 std::string
getQueryType()
const override {
return dp_query->getTypeLabel(); }
121 bool maintainOrder =
true)
override;
136 std::string
res =
"";
138 for (
unsigned int i = 0; i <
depth; ++i) {
141 res +=
q->getFullDescription() +
"\n";
142 for (
const auto &
child :
152 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 Query< MatchFuncArgType, DataFuncArgType, needsConversion > * copy() const
returns a copy of this Query
The class for representing atoms.
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
unsigned int getNumRadicalElectrons() const
returns the number of radical electrons for this Atom
virtual bool hasQuery() const
int getFormalCharge() const
returns the formal charge of this atom
unsigned int getIsotope() const
returns our isotope number
virtual QUERYATOM_QUERY * getQuery() const
NOT CALLABLE.
Class for storing atomic queries.
bool hasQuery() const override
bool QueryMatch(QueryAtom const *what) const
returns true if our query details match those of QueryAtom what
QueryAtom & operator=(const QueryAtom &other)
void setQuery(QUERYATOM_QUERY *what) override
replaces our current query with the value passed in
QueryAtom(QueryAtom &&other) noexcept
bool Match(Atom const *what) const override
returns true if we match Atom what
Queries::Query< int, Atom const *, true > QUERYATOM_QUERY
QueryAtom & operator=(QueryAtom &&other) noexcept
QueryAtom(const QueryAtom &other)
QueryAtom(const Atom &other)
void expandQuery(QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true) override
expands our current query
std::string getQueryType() const override
returns the label associated to this query
QUERYATOM_QUERY * getQuery() const override
returns our current query
Atom * copy() const override
returns a copy of this query, owned by the caller
#define RDKIT_GRAPHMOL_EXPORT
bool rdvalue_is(const RDValue_cast_t)
T * makeAtomFormalChargeQuery(int what, const std::string &descr)
returns a Query for matching formal charge
T * makeAtomNumRadicalElectronsQuery(int what, const std::string &descr)
returns a Query for matching the number of radical electrons
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