Chemical Data Processing Library C++ API - Version 1.2.0
|
A common interface for data-structures that support a random access to stored Chem::Entity3D instances. More...
#include <Entity3DContainer.hpp>
Public Types | |
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 | getNumEntities () const =0 |
Returns the number of stored Chem::Entity3D objects. More... | |
virtual const Entity3D & | getEntity (std::size_t idx) const =0 |
Returns a const reference to the Chem::Entity3D instance at index idx. More... | |
virtual Entity3D & | getEntity (std::size_t idx)=0 |
Returns a non-const reference to the entity at index idx. More... | |
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 | ~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::Entity3D instances.
Implementations have to guarantee that a given Chem::Entity3D object is stored only once and its index is unique amongst all contained Chem::Entity3D instances. Otherwise algorithms that rely on this behaviour may not work correctly!
typedef Util::IndexedElementIterator<const Entity3D, ConstEntityAccessor> CDPL::Chem::Entity3DContainer::ConstEntityIterator |
A constant random access iterator used to iterate over the stored const
Chem::Entity3D objects.
typedef Util::IndexedElementIterator<Entity3D, EntityAccessor> CDPL::Chem::Entity3DContainer::EntityIterator |
A mutable random access iterator used to iterate over the stored Chem::Entity3D objects.
|
inlineprotectedvirtual |
Virtual destructor.
|
pure virtual |
Returns the number of stored Chem::Entity3D objects.
Implemented in CDPL::Pharm::FeatureContainer, CDPL::ConfGen::CanonicalFragment, and CDPL::Chem::AtomContainer.
|
pure 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]. |
Implemented in CDPL::Pharm::FeatureContainer, CDPL::ConfGen::CanonicalFragment, and CDPL::Chem::AtomContainer.
|
pure 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]. |
Implemented in CDPL::Pharm::FeatureContainer, CDPL::ConfGen::CanonicalFragment, and CDPL::Chem::AtomContainer.
ConstEntityIterator CDPL::Chem::Entity3DContainer::getEntitiesBegin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the stored const
Chem::Entity3D objects.
const
Chem::Entity3D objects. ConstEntityIterator CDPL::Chem::Entity3DContainer::getEntitiesEnd | ( | ) | const |
Returns a constant iterator pointing to the end of the stored const
Chem::Entity3D objects.
const
Chem::Entity3D objects. EntityIterator CDPL::Chem::Entity3DContainer::getEntitiesBegin | ( | ) |
Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D objects.
EntityIterator CDPL::Chem::Entity3DContainer::getEntitiesEnd | ( | ) |
Returns a mutable iterator pointing to the end of the stored Chem::Entity3D objects.
ConstEntityIterator CDPL::Chem::Entity3DContainer::begin | ( | ) | const |
Returns a constant iterator pointing to the beginning of the stored const
Chem::Entity3D objects.
const
Chem::Entity3D objects. ConstEntityIterator CDPL::Chem::Entity3DContainer::end | ( | ) | const |
Returns a constant iterator pointing to the end of the stored const
Chem::Entity3D objects.
const
Chem::Entity3D objects. EntityIterator CDPL::Chem::Entity3DContainer::begin | ( | ) |
Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D objects.
EntityIterator CDPL::Chem::Entity3DContainer::end | ( | ) |
Returns a mutable iterator pointing to the end of the stored Chem::Entity3D objects.
|
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. |