29 #ifndef CDPL_CHEM_BONDCONTAINER_HPP 
   30 #define CDPL_CHEM_BONDCONTAINER_HPP 
   56             class ConstBondAccessor;
 
  197                 ConstBondAccessor(
const BondAccessor& accessor):
 
  198                     container(accessor.container) {}
 
  203                 const Bond& operator()(std::size_t idx)
 const 
  205                     return container->getBond(idx);
 
  208                 bool operator==(
const ConstBondAccessor& accessor)
 const 
  210                     return (container == accessor.container);
 
  213                 ConstBondAccessor& operator=(
const BondAccessor& accessor)
 
  215                     container = accessor.container;
 
  220                 const BondContainer* container;
 
  226                 friend class ConstBondAccessor;
 
  229                 BondAccessor(BondContainer* cntnr):
 
  232                 Bond& operator()(std::size_t idx)
 const 
  234                     return container->getBond(idx);
 
  237                 bool operator==(
const BondAccessor& accessor)
 const 
  239                     return (container == accessor.container);
 
  243                 BondContainer* container;
 
Type definition of a generic wrapper class for storing user-defined Chem::Bond compare functions.
 
Definition of the preprocessor macro CDPL_CHEM_API.
 
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
 
Definition of the class CDPL::Util::IndexedElementIterator.
 
A common interface for data-structures that support a random access to stored Chem::Bond instances.
Definition: BondContainer.hpp:54
 
Util::IndexedElementIterator< Bond, BondAccessor > BondIterator
A mutable random access iterator used to iterate over the stored Chem::Bond objects.
Definition: BondContainer.hpp:68
 
virtual std::size_t getNumBonds() const =0
Returns the number of stored Chem::Bond objects.
 
BondIterator begin()
Returns a mutable iterator pointing to the beginning of the stored Chem::Bond objects.
 
virtual bool containsBond(const Bond &bond) const =0
Tells whether the specified Chem::Bond instance is stored in this container.
 
ConstBondIterator end() const
Returns a constant iterator pointing to the end of the stored const Chem::Bond objects.
 
BondIterator getBondsEnd()
Returns a mutable iterator pointing to the end of the stored Chem::Bond objects.
 
const BondContainer & getBonds() const
Returns a const reference to itself.
Definition: BondContainer.hpp:165
 
virtual Bond & getBond(std::size_t idx)=0
Returns a non-const reference to the bond at index idx.
 
BondContainer & operator=(const BondContainer &cntnr)
Assignment operator.
 
ConstBondIterator getBondsEnd() const
Returns a constant iterator pointing to the end of the stored const Chem::Bond objects.
 
BondIterator end()
Returns a mutable iterator pointing to the end of the stored Chem::Bond objects.
 
ConstBondIterator getBondsBegin() const
Returns a constant iterator pointing to the beginning of the stored const Chem::Bond objects.
 
virtual ~BondContainer()
Virtual destructor.
Definition: BondContainer.hpp:183
 
virtual const Bond & getBond(std::size_t idx) const =0
Returns a const reference to the Chem::Bond instance at index idx.
 
virtual void orderBonds(const BondCompareFunction &func)=0
Orders the stored bonds according to criteria implemented by the provided bond comparison function.
 
ConstBondIterator begin() const
Returns a constant iterator pointing to the beginning of the stored const Chem::Bond objects.
 
virtual std::size_t getBondIndex(const Bond &bond) const =0
Returns the index of the specified Chem::Bond instance in this container.
 
Util::IndexedElementIterator< const Bond, ConstBondAccessor > ConstBondIterator
A constant random access iterator used to iterate over the stored const Chem::Bond objects.
Definition: BondContainer.hpp:57
 
BondContainer & getBonds()
Returns a reference to itself.
Definition: BondContainer.hpp:174
 
BondIterator getBondsBegin()
Returns a mutable iterator pointing to the beginning of the stored Chem::Bond objects.
 
Bond.
Definition: Bond.hpp:50
 
A STL compatible random access iterator for container elements accessible by index.
Definition: IndexedElementIterator.hpp:125
 
std::function< bool(const Chem::Bond &, const Chem::Bond &)> BondCompareFunction
A generic wrapper class used to store a user-defined bond compare function.
Definition: BondCompareFunction.hpp:41
 
GridEquality< E1, E2 >::ResultType operator==(const GridExpression< E1 > &e1, const GridExpression< E2 > &e2)
Definition: GridExpression.hpp:339
 
The namespace of the Chemical Data Processing Library.