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
 returns whether or not we match the argument
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 24 of file QueryBond.h.


Member Typedef Documentation

typedef Queries::Query<int,Bond const *,true> RDKit::QueryBond::QUERYBOND_QUERY

Reimplemented from RDKit::Bond.

Definition at line 26 of file QueryBond.h.


Constructor & Destructor Documentation

RDKit::QueryBond::QueryBond (  )  [inline]

Definition at line 28 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 32 of file QueryBond.h.

RDKit::QueryBond::QueryBond ( const QueryBond other  )  [inline]

Definition at line 33 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.

QueryBond& RDKit::QueryBond::operator= ( const QueryBond other  ) 

void RDKit::QueryBond::setBondType ( BondType  bT  ) 

sets the BondType of this query:

Reimplemented from RDKit::Bond.

void RDKit::QueryBond::setBondDir ( BondDir  bD  ) 

sets the BondDir of this query:

Reimplemented from RDKit::Bond.

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]

returns whether or not we match the argument

Notes:

Reimplemented from RDKit::Bond.

bool RDKit::QueryBond::hasQuery (  )  const [inline, virtual]

Reimplemented from RDKit::Bond.

Definition at line 56 of file QueryBond.h.

References dp_query.

QUERYBOND_QUERY* RDKit::QueryBond::getQuery (  )  const [inline, virtual]

returns our current query

Reimplemented from RDKit::Bond.

Definition at line 59 of file QueryBond.h.

References dp_query.

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 61 of file QueryBond.h.

References dp_query.

void RDKit::QueryBond::expandQuery ( QUERYBOND_QUERY what,
Queries::CompositeQueryType  how = Queries::COMPOSITE_AND,
bool  maintainOrder = true 
)

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:

Reimplemented from RDKit::Bond.


Member Data Documentation

QUERYBOND_QUERY* RDKit::QueryBond::dp_query [protected]

Definition at line 87 of file QueryBond.h.

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


The documentation for this class was generated from the following file:
Generated on Sat May 24 08:36:34 2008 for RDCode by  doxygen 1.5.3