|
Open Babel
3.0
|
#include <openbabel/obiter.h>
Public Member Functions | |
| OBMolAtomIter () | |
| OBMolAtomIter (OBMol *mol) | |
| OBMolAtomIter (OBMol &mol) | |
| OBMolAtomIter (const OBMolAtomIter &ai) | |
| ~OBMolAtomIter () | |
| OBMolAtomIter & | operator= (const OBMolAtomIter &ai) |
| operator bool () const | |
| OBMolAtomIter & | operator++ () |
| OBMolAtomIter | operator++ (int) |
| OBAtom * | operator-> () const |
| OBAtom & | operator* () const |
Iterate over all atoms in an OBMol.
To facilitate iteration through all atoms in a molecule, without resorting to atom indexes (which will change in the future), a variety of iterator methods are provided.
This has been made significantly easier by a series of macros in the obiter.h header file:
Here is an example:
|
inline |
| OBMolAtomIter | ( | OBMol * | mol | ) |
| OBMolAtomIter | ( | OBMol & | mol | ) |
| OBMolAtomIter | ( | const OBMolAtomIter & | ai | ) |
|
inline |
| OBMolAtomIter & operator= | ( | const OBMolAtomIter & | ai | ) |
|
inline |
| OBMolAtomIter & operator++ | ( | ) |
Preincrement iterator – advance to next atom and return.
| OBMolAtomIter operator++ | ( | int | ) |
Postincrement iterator – return the current atom and advance.
|
inline |
|
inline |
1.8.13