Class for storing Bond queries. More...
#include <QueryBond.h>
Public Types | |
| typedef Queries::Query< int, Bond const *, true > | QUERYBOND_QUERY |
Public Member Functions | |
| QueryBond () | |
| QueryBond (BondType bT) | |
| initialize with a particular bond order | |
| QueryBond (const Bond &other) | |
| initialize from a bond | |
| QueryBond (const QueryBond &other) | |
| ~QueryBond () | |
| virtual Bond * | copy () const |
| returns a copy of this query, owned by the caller | |
| QueryBond & | operator= (const QueryBond &other) |
| void | setBondType (BondType bT) |
| sets the BondType of this query: | |
| void | setBondDir (BondDir bD) |
| sets the BondDir of this query: | |
| bool | Match (const Bond::BOND_SPTR what) const |
returns true if we match Bond what | |
| bool | Match (Bond const *what) const |
| bool | hasQuery () const |
| QUERYBOND_QUERY * | getQuery () const |
| returns our current query | |
| void | setQuery (QUERYBOND_QUERY *what) |
| replaces our current query with the value passed in | |
| void | expandQuery (QUERYBOND_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true) |
| expands our current query | |
Protected Attributes | |
| QUERYBOND_QUERY * | dp_query |
Class for storing Bond queries.
QueryBond objects are derived from Bond objects, so they can be added to molecules and the like, but they have much fancier querying capabilities.
Definition at line 28 of file QueryBond.h.
| typedef Queries::Query<int,Bond const *,true> RDKit::QueryBond::QUERYBOND_QUERY |
Reimplemented from RDKit::Bond.
Definition at line 30 of file QueryBond.h.
| RDKit::QueryBond::QueryBond | ( | ) | [inline] |
Definition at line 32 of file QueryBond.h.
| RDKit::QueryBond::QueryBond | ( | BondType | bT | ) | [explicit] |
initialize with a particular bond order
| RDKit::QueryBond::QueryBond | ( | const Bond & | other | ) | [inline, explicit] |
initialize from a bond
Definition at line 36 of file QueryBond.h.
| RDKit::QueryBond::QueryBond | ( | const QueryBond & | other | ) | [inline] |
Definition at line 37 of file QueryBond.h.
| RDKit::QueryBond::~QueryBond | ( | ) |
| virtual Bond* RDKit::QueryBond::copy | ( | ) | const [virtual] |
returns a copy of this query, owned by the caller
Reimplemented from RDKit::Bond.
| void RDKit::QueryBond::expandQuery | ( | QUERYBOND_QUERY * | what, | |
| Queries::CompositeQueryType | how = Queries::COMPOSITE_AND, |
|||
| bool | maintainOrder = true | |||
| ) | [virtual] |
expands our current query
| what | the Queries::Query to be added | |
| how | the operator to be used in the expansion | |
| maintainOrder | (optional) flags whether the relative order of the queries needs to be maintained, if this is false, the order is reversed |
Notes:
what should probably be constructed using one of the functions defined in QueryOps.hmaintainOrder option can be useful because the combination operators short circuit when possible. Reimplemented from RDKit::Bond.
| QUERYBOND_QUERY* RDKit::QueryBond::getQuery | ( | ) | const [inline, virtual] |
returns our current query
Reimplemented from RDKit::Bond.
Definition at line 63 of file QueryBond.h.
References dp_query.
| bool RDKit::QueryBond::hasQuery | ( | ) | const [inline, virtual] |
| bool RDKit::QueryBond::Match | ( | const Bond::BOND_SPTR | what | ) | const [virtual] |
returns true if we match Bond what
Reimplemented from RDKit::Bond.
| bool RDKit::QueryBond::Match | ( | Bond const * | what | ) | const [virtual] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented from RDKit::Bond.
| void RDKit::QueryBond::setBondDir | ( | BondDir | bD | ) |
sets the BondDir of this query:
Reimplemented from RDKit::Bond.
| void RDKit::QueryBond::setBondType | ( | BondType | bT | ) |
sets the BondType of this query:
Reimplemented from RDKit::Bond.
| void RDKit::QueryBond::setQuery | ( | QUERYBOND_QUERY * | what | ) | [inline, virtual] |
replaces our current query with the value passed in
Reimplemented from RDKit::Bond.
Definition at line 65 of file QueryBond.h.
References dp_query.
QUERYBOND_QUERY* RDKit::QueryBond::dp_query [protected] |
Definition at line 91 of file QueryBond.h.
Referenced by getQuery(), hasQuery(), and setQuery().
1.7.1