Chemical Data Processing Library C++ API - Version 1.1.1
|
A common interface for data-structures that support a random access to stored Chem::Atom instances. More...
#include <AtomContainer.hpp>
Public Types | |
typedef Util::IndexedElementIterator< const Atom, ConstAtomAccessor > | ConstAtomIterator |
A constant random access iterator used to iterate over the stored const Chem::Atom objects. More... | |
typedef Util::IndexedElementIterator< Atom, AtomAccessor > | AtomIterator |
A mutable random access iterator used to iterate over the stored Chem::Atom objects. More... | |
Public Types inherited from CDPL::Chem::Entity3DContainer | |
typedef Util::IndexedElementIterator< const Entity3D, ConstEntityAccessor > | ConstEntityIterator |
A constant random access iterator used to iterate over the stored const Chem::Entity3D objects. More... | |
typedef Util::IndexedElementIterator< Entity3D, EntityAccessor > | EntityIterator |
A mutable random access iterator used to iterate over the stored Chem::Entity3D objects. More... | |
Public Member Functions | |
virtual std::size_t | getNumAtoms () const =0 |
Returns the number of stored Chem::Atom objects. More... | |
virtual const Atom & | getAtom (std::size_t idx) const =0 |
Returns a const reference to the Chem::Atom instance at index idx. More... | |
virtual Atom & | getAtom (std::size_t idx)=0 |
Returns a non-const reference to the atom at index idx. More... | |
ConstAtomIterator | getAtomsBegin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Atom objects. More... | |
ConstAtomIterator | getAtomsEnd () const |
Returns a constant iterator pointing to the end of the stored const Chem::Atom objects. More... | |
AtomIterator | getAtomsBegin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Atom objects. More... | |
AtomIterator | getAtomsEnd () |
Returns a mutable iterator pointing to the end of the stored Chem::Atom objects. More... | |
ConstAtomIterator | begin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Atom objects. More... | |
ConstAtomIterator | end () const |
Returns a constant iterator pointing to the end of the stored const Chem::Atom objects. More... | |
AtomIterator | begin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Atom objects. More... | |
AtomIterator | end () |
Returns a mutable iterator pointing to the end of the stored Chem::Atom objects. More... | |
virtual bool | containsAtom (const Atom &atom) const =0 |
Tells whether the specified Chem::Atom instance is stored in this container. More... | |
virtual std::size_t | getAtomIndex (const Atom &atom) const =0 |
Returns the index of the specified Chem::Atom instance in this container. More... | |
virtual std::size_t | getNumEntities () const |
Returns the number of stored Chem::Entity3D objects. More... | |
virtual const Entity3D & | getEntity (std::size_t idx) const |
Returns a const reference to the Chem::Entity3D instance at index idx. More... | |
virtual Entity3D & | getEntity (std::size_t idx) |
Returns a non-const reference to the entity at index idx. More... | |
virtual void | orderAtoms (const AtomCompareFunction &func)=0 |
Orders the stored atoms according to criteria implemented by the provided atom comparison function. More... | |
const AtomContainer & | getAtoms () const |
Returns a const reference to itself. More... | |
AtomContainer & | getAtoms () |
Returns a reference to itself. More... | |
Public Member Functions inherited from CDPL::Chem::Entity3DContainer | |
ConstEntityIterator | getEntitiesBegin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Entity3D objects. More... | |
ConstEntityIterator | getEntitiesEnd () const |
Returns a constant iterator pointing to the end of the stored const Chem::Entity3D objects. More... | |
EntityIterator | getEntitiesBegin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D objects. More... | |
EntityIterator | getEntitiesEnd () |
Returns a mutable iterator pointing to the end of the stored Chem::Entity3D objects. More... | |
ConstEntityIterator | begin () const |
Returns a constant iterator pointing to the beginning of the stored const Chem::Entity3D objects. More... | |
ConstEntityIterator | end () const |
Returns a constant iterator pointing to the end of the stored const Chem::Entity3D objects. More... | |
EntityIterator | begin () |
Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D objects. More... | |
EntityIterator | end () |
Returns a mutable iterator pointing to the end of the stored Chem::Entity3D objects. More... | |
const Entity3DContainer & | getEntities () const |
Returns a const reference to itself. More... | |
Entity3DContainer & | getEntities () |
Returns a reference to itself. More... | |
Protected Member Functions | |
virtual | ~AtomContainer () |
Virtual destructor. More... | |
AtomContainer & | operator= (const AtomContainer &cntnr) |
Assignment operator. More... | |
Protected Member Functions inherited from CDPL::Chem::Entity3DContainer | |
virtual | ~Entity3DContainer () |
Virtual destructor. More... | |
Entity3DContainer & | operator= (const Entity3DContainer &cntnr) |
Assignment operator. More... | |
A common interface for data-structures that support a random access to stored Chem::Atom instances.
Implementations have to guarantee that a given Chem::Atom object is stored only once and its index is unique amongst all contained Chem::Atom instances. Otherwise algorithms that rely on this behaviour may not work correctly!
typedef Util::IndexedElementIterator<const Atom, ConstAtomAccessor> CDPL::Chem::AtomContainer::ConstAtomIterator |
A constant random access iterator used to iterate over the stored const
Chem::Atom objects.
typedef Util::IndexedElementIterator<Atom, AtomAccessor> CDPL::Chem::AtomContainer::AtomIterator |
A mutable random access iterator used to iterate over the stored Chem::Atom objects.
|
inlineprotectedvirtual |
Virtual destructor.
|
pure virtual |
Returns the number of stored Chem::Atom objects.
Implemented in CDPL::Chem::Molecule, CDPL::Chem::Bond, CDPL::Chem::Atom, CDPL::ConfGen::CanonicalFragment, CDPL::Chem::Fragment, CDPL::Chem::ElectronSystem, CDPL::Chem::BasicMolecule, CDPL::Chem::BasicBond, and CDPL::Chem::BasicAtom.
|
pure virtual |
Returns a const
reference to the Chem::Atom instance at index idx.
idx | The zero-based index of the Chem::Atom instance to return. |
const
reference to the Chem::Atom instance at the specified index. Base::IndexError | if the container is empty or idx is not in the range [0, getNumAtoms() - 1]. |
Implemented in CDPL::Chem::Molecule, CDPL::Chem::Bond, CDPL::Chem::Atom, CDPL::ConfGen::CanonicalFragment, CDPL::Chem::Fragment, CDPL::Chem::ElectronSystem, CDPL::Chem::BasicMolecule, CDPL::Chem::BasicBond, and CDPL::Chem::BasicAtom.
|
pure virtual |
Returns a non-const
reference to the atom at index idx.
idx | The zero-based index of the Chem::Atom instance to return. |
const
reference to the atom at the specified index. Base::IndexError | if the number of atoms is zero or idx is not in the range [0, getNumAtoms() - 1]. |
Implemented in CDPL::Chem::Molecule, CDPL::Chem::Bond, CDPL::Chem::Atom, CDPL::ConfGen::CanonicalFragment, CDPL::Chem::Fragment, CDPL::Chem::ElectronSystem, CDPL::Chem::BasicMolecule, CDPL::Chem::BasicBond, and CDPL::Chem::BasicAtom.
ConstAtomIterator CDPL::Chem::AtomContainer::getAtomsBegin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the stored const
Chem::Atom objects.
const
Chem::Atom objects. ConstAtomIterator CDPL::Chem::AtomContainer::getAtomsEnd | ( | ) | const |
Returns a constant iterator pointing to the end of the stored const
Chem::Atom objects.
const
Chem::Atom objects. AtomIterator CDPL::Chem::AtomContainer::getAtomsBegin | ( | ) |
Returns a mutable iterator pointing to the beginning of the stored Chem::Atom objects.
AtomIterator CDPL::Chem::AtomContainer::getAtomsEnd | ( | ) |
Returns a mutable iterator pointing to the end of the stored Chem::Atom objects.
ConstAtomIterator CDPL::Chem::AtomContainer::begin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the stored const
Chem::Atom objects.
const
Chem::Atom objects. ConstAtomIterator CDPL::Chem::AtomContainer::end | ( | ) | const |
Returns a constant iterator pointing to the end of the stored const
Chem::Atom objects.
const
Chem::Atom objects. AtomIterator CDPL::Chem::AtomContainer::begin | ( | ) |
Returns a mutable iterator pointing to the beginning of the stored Chem::Atom objects.
AtomIterator CDPL::Chem::AtomContainer::end | ( | ) |
Returns a mutable iterator pointing to the end of the stored Chem::Atom objects.
Tells whether the specified Chem::Atom instance is stored in this container.
atom | The Chem::Atom instance to look for. |
true
if atom is stored in the container, and false
otherwise. Implemented in CDPL::ConfGen::CanonicalFragment, CDPL::Chem::Molecule, CDPL::Chem::Bond, CDPL::Chem::Atom, CDPL::Chem::Fragment, CDPL::Chem::ElectronSystem, CDPL::Chem::BasicMolecule, CDPL::Chem::BasicBond, and CDPL::Chem::BasicAtom.
|
pure virtual |
Returns the index of the specified Chem::Atom instance in this container.
atom | The Chem::Atom instance for which to return the index. |
Base::ItemNotFound | if the specified Chem::Atom instance could not be found. |
Implemented in CDPL::ConfGen::CanonicalFragment, CDPL::Chem::Molecule, CDPL::Chem::Bond, CDPL::Chem::Atom, CDPL::Chem::Fragment, CDPL::Chem::ElectronSystem, CDPL::Chem::BasicMolecule, CDPL::Chem::BasicBond, and CDPL::Chem::BasicAtom.
|
virtual |
Returns the number of stored Chem::Entity3D objects.
Implements CDPL::Chem::Entity3DContainer.
Reimplemented in CDPL::ConfGen::CanonicalFragment.
|
virtual |
Returns a const
reference to the Chem::Entity3D instance at index idx.
idx | The zero-based index of the Chem::Entity3D instance to return. |
const
reference to the Chem::Entity3D instance at the specified index. Base::IndexError | if the container is empty or idx is not in the range [0, getNumEntities() - 1]. |
Implements CDPL::Chem::Entity3DContainer.
Reimplemented in CDPL::ConfGen::CanonicalFragment.
|
virtual |
Returns a non-const
reference to the entity at index idx.
idx | The zero-based index of the Chem::Entity3D instance to return. |
const
reference to the entity at the specified index. Base::IndexError | if the number of entities is zero or idx is not in the range [0, getNumEntities() - 1]. |
Implements CDPL::Chem::Entity3DContainer.
Reimplemented in CDPL::ConfGen::CanonicalFragment.
|
pure virtual |
Orders the stored atoms according to criteria implemented by the provided atom comparison function.
func | The atom comparison function implementing the applied ordering criteria. |
Implemented in CDPL::ConfGen::CanonicalFragment, CDPL::Chem::Fragment, CDPL::Chem::ElectronSystem, CDPL::Chem::BasicMolecule, CDPL::Chem::BasicBond, and CDPL::Chem::BasicAtom.
|
inline |
Returns a const
reference to itself.
const
reference to itself.
|
inline |
Returns a reference to itself.
|
protected |
Assignment operator.
cntnr | The other container to copy. |