Loading...
Searching...
No Matches
OBQuery Class Reference
Substructure Searching

`#include <openbabel/query.h>`

## Public Member Functions

| ~OBQuery ()
unsigned int | NumAtoms () const
unsigned int | NumBonds () const
const std::vector< OBQueryAtom * > & | GetAtoms () const
const std::vector< OBQueryBond * > & | GetBonds () const
OBQueryBond * | GetBond (OBQueryAtom *begin, OBQueryAtom *end) const
void | AddAtom (OBQueryAtom *atom)
void | AddBond (OBQueryBond *bond)

## Protected Attributes

std::vector< OBQueryAtom * > | m_atoms
std::vector< OBQueryBond * > | m_bonds

## Detailed Description

A substructure query.

See Substructure Search for more information.

Since
  version 2.3

## Constructor & Destructor Documentation

## ~OBQuery()

~OBQuery | ( |  | ) |

## Member Function Documentation

## NumAtoms()

unsigned int NumAtoms | ( |  | ) | const

inline

Returns
  The number of atoms in the query.

## NumBonds()

unsigned int NumBonds | ( |  | ) | const

inline

Returns
  The number of bonds in the query.

## GetAtoms()

const std::vector< OBQueryAtom * > & GetAtoms | ( |  | ) | const

inline

Returns
  std::vector with pointers to the query atoms.

Referenced by OpenBabel::CompileAutomorphismQuery(), and OpenBabel::CompileMoleculeQuery().

## GetBonds()

const std::vector< OBQueryBond * > & GetBonds | ( |  | ) | const

inline

Returns
  std::vector with pointers to the query bonds.

## GetBond()

OBQueryBond * GetBond | ( | OBQueryAtom * | begin,
|  | OBQueryAtom * | end ) const

inline

Returns
  The query bond between `begin` and `end`. If there is no bond between `begin` and `end`, this function returns 0.

## AddAtom()

void AddAtom | ( | OBQueryAtom * | atom | ) |

inline

Add a query atom to the query. This function steals the pointer.

Referenced by OpenBabel::CompileAutomorphismQuery(), and OpenBabel::CompileMoleculeQuery().

## AddBond()

void AddBond | ( | OBQueryBond * | bond | ) |

inline

Add a query atom to the query. This function steals the pointer.

Referenced by OpenBabel::CompileAutomorphismQuery(), and OpenBabel::CompileMoleculeQuery().

## Member Data Documentation

## m_atoms

std::vector<OBQueryAtom*> m_atoms

protected

Referenced by AddAtom(), GetAtoms(), NumAtoms(), and ~OBQuery().

## m_bonds

std::vector<OBQueryBond*> m_bonds

protected

Referenced by AddBond(), GetBonds(), NumBonds(), and ~OBQuery().

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

- query.h
- query.cpp