Public Types | Public Member Functions | Protected Attributes

RDKit::QueryBond Class Reference

Class for storing Bond queries. More...

#include <QueryBond.h>

Inheritance diagram for RDKit::QueryBond:
RDKit::Bond

List of all members.

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 Bondcopy () const
 returns a copy of this query, owned by the caller
QueryBondoperator= (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_QUERYgetQuery () 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_QUERYdp_query

Detailed Description

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.


Member Typedef Documentation

Reimplemented from RDKit::Bond.

Definition at line 30 of file QueryBond.h.


Constructor & Destructor Documentation

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 (  ) 

Member Function Documentation

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

Parameters:
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.h
  • the maintainOrder 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]

Reimplemented from RDKit::Bond.

Definition at line 60 of file QueryBond.h.

References dp_query.

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.

QueryBond& RDKit::QueryBond::operator= ( const QueryBond other  ) 
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.


Member Data Documentation

Definition at line 91 of file QueryBond.h.

Referenced by getQuery(), hasQuery(), and setQuery().


The documentation for this class was generated from the following file: