RDKit::QueryAtom Class Reference

Class for storing atomic queries. More...

#include <QueryAtom.h>

Inheritance diagram for RDKit::QueryAtom:

RDKit::Atom

List of all members.

Public Types

typedef Queries::Query< int,
Atom const *, true > 
QUERYATOM_QUERY

Public Member Functions

 QueryAtom ()
 QueryAtom (int num)
 QueryAtom (const Atom &other)
 QueryAtom (const QueryAtom &other)
 ~QueryAtom ()
Atomcopy () const
 returns a copy of this query, owned by the caller
bool hasQuery () const
void setQuery (QUERYATOM_QUERY *what)
 replaces our current query with the value passed in
QUERYATOM_QUERYgetQuery () const
 returns our current query
void expandQuery (QUERYATOM_QUERY *what, Queries::CompositeQueryType how=Queries::COMPOSITE_AND, bool maintainOrder=true)
 expands our current query
bool Match (const Atom::ATOM_SPTR what) const
 returns true if we match Atom what
bool Match (Atom const *what) const
 returns whether or not we match the argument


Detailed Description

Class for storing atomic queries.

QueryAtom objects are derived from Atom objects, so they can be added to molecules and the like, but they have much fancier querying capabilities.

Definition at line 22 of file QueryAtom.h.


Member Typedef Documentation

Reimplemented from RDKit::Atom.

Definition at line 24 of file QueryAtom.h.


Constructor & Destructor Documentation

RDKit::QueryAtom::QueryAtom (  )  [inline]

Definition at line 26 of file QueryAtom.h.

RDKit::QueryAtom::QueryAtom ( int  num  )  [inline, explicit]

Definition at line 27 of file QueryAtom.h.

RDKit::QueryAtom::QueryAtom ( const Atom other  )  [inline, explicit]

Definition at line 28 of file QueryAtom.h.

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

Definition at line 29 of file QueryAtom.h.

RDKit::QueryAtom::~QueryAtom (  ) 


Member Function Documentation

Atom* RDKit::QueryAtom::copy (  )  const [virtual]

returns a copy of this query, owned by the caller

Reimplemented from RDKit::Atom.

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

Reimplemented from RDKit::Atom.

Definition at line 37 of file QueryAtom.h.

void RDKit::QueryAtom::setQuery ( QUERYATOM_QUERY what  )  [inline, virtual]

replaces our current query with the value passed in

Reimplemented from RDKit::Atom.

Definition at line 40 of file QueryAtom.h.

QUERYATOM_QUERY* RDKit::QueryAtom::getQuery (  )  const [inline, virtual]

returns our current query

Reimplemented from RDKit::Atom.

Definition at line 42 of file QueryAtom.h.

void RDKit::QueryAtom::expandQuery ( QUERYATOM_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::Atom.

bool RDKit::QueryAtom::Match ( const Atom::ATOM_SPTR  what  )  const [virtual]

returns true if we match Atom what

Reimplemented from RDKit::Atom.

bool RDKit::QueryAtom::Match ( Atom const *  what  )  const [virtual]

returns whether or not we match the argument

Notes:

  • for Atom objects, "match" means that atomic numbers are the same.

Reimplemented from RDKit::Atom.


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

Generated on Fri Apr 3 06:03:04 2009 for RDCode by  doxygen 1.5.6