Chemical Data Processing Library C++ API - Version 1.4.0
Classes | Public Types | Public Member Functions | Friends | List of all members
CDPL::Chem::BasicAtom Class Reference

Default implementation of the Chem::Atom interface. More...

#include <BasicAtom.hpp>

+ Inheritance diagram for CDPL::Chem::BasicAtom:

Public Types

typedef boost::transform_iterator< AtomAccessor< BasicAtom >, NeighborList::iterator > AtomIterator
 A mutable random access iterator used to iterate over the connected Chem::BasicAtom instances. More...
 
typedef boost::transform_iterator< AtomAccessor< const BasicAtom >, NeighborList::const_iterator > ConstAtomIterator
 A constant random access iterator used to iterate over the connected const Chem::BasicAtom instances. More...
 
typedef boost::transform_iterator< BondAccessor< BasicBond >, NeighborList::iterator > BondIterator
 A mutable random access iterator used to iterate over the incident Chem::BasicBond instances. More...
 
typedef boost::transform_iterator< BondAccessor< const BasicBond >, NeighborList::const_iterator > ConstBondIterator
 A constant random access iterator used to iterate over the incident const Chem::BasicBond instances. More...
 
- Public Types inherited from CDPL::Chem::Atom
typedef AtomContainer::AtomIterator AtomIterator
 A mutable random access iterator used to iterate over the connected Chem::Atom instances. More...
 
typedef AtomContainer::ConstAtomIterator ConstAtomIterator
 A constant random access iterator used to iterate over the connected const Chem::Atom instances. More...
 
typedef BondContainer::BondIterator BondIterator
 A mutable random access iterator used to iterate over the incident Chem::Bond instances. More...
 
typedef BondContainer::ConstBondIterator ConstBondIterator
 A constant random access iterator used to iterate over the incident const Chem::Bond instances. More...
 
- Public Types inherited from CDPL::Chem::AtomContainer
typedef Util::IndexedElementIterator< const Atom, ConstAtomAccessor > ConstAtomIterator
 A constant random access iterator used to iterate over the stored const Chem::Atom instances. More...
 
typedef Util::IndexedElementIterator< Atom, AtomAccessor > AtomIterator
 A mutable random access iterator used to iterate over the stored Chem::Atom instances. 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 instances. More...
 
typedef Util::IndexedElementIterator< Entity3D, EntityAccessor > EntityIterator
 A mutable random access iterator used to iterate over the stored Chem::Entity3D instances. More...
 
- Public Types inherited from CDPL::Chem::BondContainer
typedef Util::IndexedElementIterator< const Bond, ConstBondAccessor > ConstBondIterator
 A constant random access iterator used to iterate over the stored const Chem::Bond instances. More...
 
typedef Util::IndexedElementIterator< Bond, BondAccessor > BondIterator
 A mutable random access iterator used to iterate over the stored Chem::Bond instances. More...
 
- Public Types inherited from CDPL::Base::PropertyContainer
typedef PropertyMap::value_type PropertyEntry
 A Base::LookupKey / Base::Any pair that stores the property value for a given property key. More...
 
typedef PropertyMap::const_iterator ConstPropertyIterator
 A constant iterator used to iterate over the property entries. More...
 

Public Member Functions

const Molecule & getMolecule () const
 Returns a const reference to the parent molecule. More...
 
Molecule & getMolecule ()
 Returns a non-const reference to the parent molecule. More...
 
std::size_t getNumAtoms () const
 Returns the number of connected atoms. More...
 
std::size_t getNumBonds () const
 Returns the number of incident bonds. More...
 
const Bond & getBond (std::size_t idx) const
 Returns a const reference to the incident bond at index idx. More...
 
Bond & getBond (std::size_t idx)
 Returns a non-const reference to the incident bond at index idx. More...
 
const Bond & getBondToAtom (const Atom &atom) const
 Returns a const reference to the bond that connects this atom to the argument atom. More...
 
Bond & getBondToAtom (const Atom &atom)
 Returns a non-const reference to the bond that connects this atom to the argument atom. More...
 
const Bond * findBondToAtom (const Atom &atom) const
 Returns a pointer to the const bond that connects this atom to the argument atom. More...
 
Bond * findBondToAtom (const Atom &atom)
 Returns a pointer to the non-const bond that connects this atom to the argument atom. More...
 
const Atom & getAtom (std::size_t idx) const
 Returns a const reference to the connected atom at index idx. More...
 
Atom & getAtom (std::size_t idx)
 Returns a non-const reference to the connected atom at index idx. More...
 
ConstAtomIterator getAtomsBegin () const
 Returns a constant iterator pointing to the beginning of the connected const Chem::BasicAtom instances. More...
 
AtomIterator getAtomsBegin ()
 Returns a mutable iterator pointing to the end of the connected Chem::BasicAtom instances. More...
 
ConstAtomIterator getAtomsEnd () const
 Returns a constant iterator pointing to the end of the connected const Chem::BasicAtom instances. More...
 
AtomIterator getAtomsEnd ()
 Returns a mutable iterator pointing to the end of the connected Chem::BasicAtom instances. More...
 
ConstBondIterator getBondsBegin () const
 Returns a constant iterator pointing to the beginning of the incident const Chem::BasicBond instances. More...
 
BondIterator getBondsBegin ()
 Returns a mutable iterator pointing to the beginning of the incident Chem::BasicBond instances. More...
 
ConstBondIterator getBondsEnd () const
 Returns a constant iterator pointing to the end of the incident const Chem::BasicBond instances. More...
 
BondIterator getBondsEnd ()
 Returns a mutable iterator pointing to the end of the incident Chem::BasicBond instances. More...
 
bool containsAtom (const Atom &atom) const
 Tells whether this atom and the specified atom are connected by a bond. More...
 
bool containsBond (const Bond &bond) const
 Tells whether the specified bond is incident to this atom. More...
 
std::size_t getAtomIndex (const Atom &atom) const
 Returns the index of the specified connected atom. More...
 
std::size_t getBondIndex (const Bond &bond) const
 Returns the index of the specified incident bond. More...
 
std::size_t getIndex () const
 Returns the index of the atom in its parent molecule. More...
 
void orderAtoms (const AtomCompareFunction &func)
 Orders the atoms according to criteria implemented by the provided atom comparison function. More...
 
void orderBonds (const BondCompareFunction &func)
 Orders the bonds according to criteria implemented by the provided bond comparison function. More...
 
BasicAtom & operator= (const BasicAtom &atom)
 Assignment operator that replaces the current set of properties with the properties of atom. More...
 
Atom & operator= (const Atom &atom)
 Assignment operator that replaces the current set of properties with the properties of atom. More...
 
- Public Member Functions inherited from CDPL::Chem::Atom
Atom & operator= (const Atom &atom)
 Assignment operator that replaces the current set of properties with the properties of atom. More...
 
ConstAtomIterator getAtomsBegin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Atom instances. More...
 
AtomIterator getAtomsBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Atom instances. More...
 
ConstAtomIterator getAtomsEnd () const
 Returns a constant iterator pointing to the end of the stored const Chem::Atom instances. More...
 
AtomIterator getAtomsEnd ()
 Returns a mutable iterator pointing to the end of the stored Chem::Atom instances. More...
 
ConstBondIterator getBondsBegin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Bond instances. More...
 
BondIterator getBondsBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Bond instances. More...
 
ConstBondIterator getBondsEnd () const
 Returns a constant iterator pointing to the end of the stored const Chem::Bond instances. More...
 
BondIterator getBondsEnd ()
 Returns a mutable iterator pointing to the end of the stored Chem::Bond instances. More...
 
- Public Member Functions inherited from CDPL::Chem::AtomContainer
ConstAtomIterator getAtomsBegin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Atom instances. More...
 
ConstAtomIterator getAtomsEnd () const
 Returns a constant iterator pointing to the end of the stored const Chem::Atom instances. More...
 
AtomIterator getAtomsBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Atom instances. More...
 
AtomIterator getAtomsEnd ()
 Returns a mutable iterator pointing to the end of the stored Chem::Atom instances. More...
 
ConstAtomIterator begin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Atom instances. More...
 
ConstAtomIterator end () const
 Returns a constant iterator pointing to the end of the stored const Chem::Atom instances. More...
 
AtomIterator begin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Atom instances. More...
 
AtomIterator end ()
 Returns a mutable iterator pointing to the end of the stored Chem::Atom instances. More...
 
virtual std::size_t getNumEntities () const
 Returns the number of stored Chem::Entity3D instances. More...
 
virtual const Chem::Entity3D & getEntity (std::size_t idx) const
 Returns a const reference to the entity at index idx. More...
 
virtual Chem::Entity3D & getEntity (std::size_t idx)
 Returns a non-const reference to the entity at index idx. 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 instances. More...
 
ConstEntityIterator getEntitiesEnd () const
 Returns a constant iterator pointing to the end of the stored const Chem::Entity3D instances. More...
 
EntityIterator getEntitiesBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D instances. More...
 
EntityIterator getEntitiesEnd ()
 Returns a mutable iterator pointing to the end of the stored Chem::Entity3D instances. More...
 
ConstEntityIterator begin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Entity3D instances. More...
 
ConstEntityIterator end () const
 Returns a constant iterator pointing to the end of the stored const Chem::Entity3D instances. More...
 
EntityIterator begin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Entity3D instances. More...
 
EntityIterator end ()
 Returns a mutable iterator pointing to the end of the stored Chem::Entity3D instances. More...
 
const Entity3DContainer & getEntities () const
 Returns a const reference to itself. More...
 
Entity3DContainer & getEntities ()
 Returns a reference to itself. More...
 
- Public Member Functions inherited from CDPL::Chem::BondContainer
ConstBondIterator getBondsBegin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Bond instances. More...
 
ConstBondIterator getBondsEnd () const
 Returns a constant iterator pointing to the end of the stored const Chem::Bond instances. More...
 
BondIterator getBondsBegin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Bond instances. More...
 
BondIterator getBondsEnd ()
 Returns a mutable iterator pointing to the end of the stored Chem::Bond instances. More...
 
ConstBondIterator begin () const
 Returns a constant iterator pointing to the beginning of the stored const Chem::Bond instances. More...
 
ConstBondIterator end () const
 Returns a constant iterator pointing to the end of the stored const Chem::Bond instances. More...
 
BondIterator begin ()
 Returns a mutable iterator pointing to the beginning of the stored Chem::Bond instances. More...
 
BondIterator end ()
 Returns a mutable iterator pointing to the end of the stored Chem::Bond instances. More...
 
const BondContainer & getBonds () const
 Returns a const reference to itself. More...
 
BondContainer & getBonds ()
 Returns a reference to itself. More...
 
- Public Member Functions inherited from CDPL::Base::PropertyContainer
std::size_t getNumProperties () const
 Returns the number of property entries. More...
 
template<typename T >
void setProperty (const LookupKey &key, T &&val)
 Sets the value of the property specified by key to val. More...
 
template<typename T >
const T & getProperty (const LookupKey &key) const
 Returns the value of the property specified by key as a const reference to an object of type T. More...
 
template<typename T >
const T & getPropertyOrDefault (const LookupKey &key, const T &def_val) const
 Returns the value of the property specified by key as a const reference to an object of type T, or the default value def_val if an entry does not exist. More...
 
const Any & getProperty (const LookupKey &key, bool throw_=false) const
 Returns the value of the property specified by key. More...
 
bool isPropertySet (const LookupKey &key) const
 Tells whether or not a value has been assigned to the property specified by key. More...
 
ConstPropertyIterator getPropertiesBegin () const
 Returns a constant iterator pointing to the beginning of the property entries. More...
 
ConstPropertyIterator getPropertiesEnd () const
 Returns a constant iterator pointing to the end of the property entries. More...
 
ConstPropertyIterator begin () const
 Returns a constant iterator pointing to the beginning of the property entries. More...
 
ConstPropertyIterator end () const
 Returns a constant iterator pointing to the end of the property entries. More...
 
bool removeProperty (const LookupKey &key)
 Removes the entry for the property specified by key. More...
 
void clearProperties ()
 Erases all container entries. More...
 
void addProperties (const PropertyContainer &cntnr)
 Adds the property entries of the PropertyContainer instance cntnr. More...
 
void copyProperties (const PropertyContainer &cntnr)
 Replaces the current property entries by a copy of the entries in cntnr. More...
 
void swap (PropertyContainer &cntnr)
 Exchanges the property entries of this container with the ones of cntnr. More...
 
const PropertyContainer & getProperties () const
 Returns a const reference to itself. More...
 

Friends

class BasicMolecule
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Chem::Atom
virtual ~Atom ()
 Virtual destructor. More...
 
- Protected Member Functions inherited from CDPL::Chem::AtomContainer
virtual ~AtomContainer ()
 Virtual destructor. More...
 
AtomContainer & operator= (const AtomContainer &cntnr)
 Replaces the current set of properties by a copy of the properties of the container cntnr. More...
 
- Protected Member Functions inherited from CDPL::Chem::Entity3DContainer
virtual ~Entity3DContainer ()
 Virtual destructor. More...
 
Entity3DContainer & operator= (const Entity3DContainer &cntnr)
 Assignment operator. More...
 
- Protected Member Functions inherited from CDPL::Chem::BondContainer
virtual ~BondContainer ()
 Virtual destructor. More...
 
BondContainer & operator= (const BondContainer &cntnr)
 Replaces the current set of properties by a copy of the properties of the container cntnr. More...
 
- Protected Member Functions inherited from CDPL::Chem::Entity3D
 Entity3D ()
 Default constructor. More...
 
 Entity3D (const Entity3D &entity)
 Constructs a copy of the Entity3D instance entity. More...
 
virtual ~Entity3D ()
 Virtual destructor. More...
 
Entity3D & operator= (const Entity3D &entity)
 Assignment operator. More...
 
- Protected Member Functions inherited from CDPL::Base::PropertyContainer
 PropertyContainer ()
 Constructs an empty PropertyContainer instance. More...
 
 PropertyContainer (const PropertyContainer &cntnr)
 Constructs a copy of the PropertyContainer instance cntnr. More...
 
virtual ~PropertyContainer ()
 Virtual destructor. More...
 
PropertyContainer & operator= (const PropertyContainer &cntnr)
 Assignment operator. More...
 

Detailed Description

Default implementation of the Chem::Atom interface.

Provides constant-time access to connected atoms and incident bonds via the inherited Chem::Atom interface. BasicAtom instances are created, owned and managed exclusively by a Chem::BasicMolecule instance.

Member Typedef Documentation

◆ AtomIterator

typedef boost::transform_iterator<AtomAccessor<BasicAtom>, NeighborList::iterator> CDPL::Chem::BasicAtom::AtomIterator

A mutable random access iterator used to iterate over the connected Chem::BasicAtom instances.

◆ ConstAtomIterator

typedef boost::transform_iterator<AtomAccessor<const BasicAtom>, NeighborList::const_iterator> CDPL::Chem::BasicAtom::ConstAtomIterator

A constant random access iterator used to iterate over the connected const Chem::BasicAtom instances.

◆ BondIterator

typedef boost::transform_iterator<BondAccessor<BasicBond>, NeighborList::iterator> CDPL::Chem::BasicAtom::BondIterator

A mutable random access iterator used to iterate over the incident Chem::BasicBond instances.

◆ ConstBondIterator

typedef boost::transform_iterator<BondAccessor<const BasicBond>, NeighborList::const_iterator> CDPL::Chem::BasicAtom::ConstBondIterator

A constant random access iterator used to iterate over the incident const Chem::BasicBond instances.

Member Function Documentation

◆ getMolecule() [1/2]

const Molecule& CDPL::Chem::BasicAtom::getMolecule ( ) const
virtual

Returns a const reference to the parent molecule.

Returns
A const reference to the parent molecule.

Implements CDPL::Chem::Atom.

◆ getMolecule() [2/2]

Molecule& CDPL::Chem::BasicAtom::getMolecule ( )
virtual

Returns a non-const reference to the parent molecule.

Returns
A non-const reference to the parent molecule.

Implements CDPL::Chem::Atom.

◆ getNumAtoms()

std::size_t CDPL::Chem::BasicAtom::getNumAtoms ( ) const
virtual

Returns the number of connected atoms.

Equivalent to getNumBonds().

Returns
The number of connected atoms.

Implements CDPL::Chem::Atom.

◆ getNumBonds()

std::size_t CDPL::Chem::BasicAtom::getNumBonds ( ) const
virtual

Returns the number of incident bonds.

Equivalent to getNumAtoms().

Returns
The number of incident bonds.

Implements CDPL::Chem::Atom.

◆ getBond() [1/2]

const Bond& CDPL::Chem::BasicAtom::getBond ( std::size_t  idx) const
virtual

Returns a const reference to the incident bond at index idx.

Parameters
idxThe index of the incident bond to return.
Returns
A const reference to the incident bond at index idx.
Exceptions
Base::IndexErrorif idx is not in the range [0, getNumBonds()).
Note
The order of incident bonds corresponds to the order of the connected atoms.

Implements CDPL::Chem::Atom.

◆ getBond() [2/2]

Bond& CDPL::Chem::BasicAtom::getBond ( std::size_t  idx)
virtual

Returns a non-const reference to the incident bond at index idx.

Parameters
idxThe index of the incident bond to return.
Returns
A non-const reference to the incident bond at index idx.
Exceptions
Base::IndexErrorif idx is not in the range [0, getNumBonds()).
Note
The order of incident bonds corresponds to the order of connected atoms.

Implements CDPL::Chem::Atom.

◆ getBondToAtom() [1/2]

const Bond& CDPL::Chem::BasicAtom::getBondToAtom ( const Atom &  atom) const
virtual

Returns a const reference to the bond that connects this atom to the argument atom.

Parameters
atomThe adjacent atom for which to return the connecting bond.
Returns
A const reference to the bond connecting this atom and the argument atom.
Exceptions
Base::ItemNotFoundif the argument atom is not connected to this atom.

Implements CDPL::Chem::Atom.

◆ getBondToAtom() [2/2]

Bond& CDPL::Chem::BasicAtom::getBondToAtom ( const Atom &  atom)
virtual

Returns a non-const reference to the bond that connects this atom to the argument atom.

Parameters
atomThe adjacent atom for which to return the connecting bond.
Returns
A non-const reference to the bond connecting this atom and the argument atom.
Exceptions
Base::ItemNotFoundif the argument atom is not connected to this atom.

Implements CDPL::Chem::Atom.

◆ findBondToAtom() [1/2]

const Bond* CDPL::Chem::BasicAtom::findBondToAtom ( const Atom &  atom) const
virtual

Returns a pointer to the const bond that connects this atom to the argument atom.

Parameters
atomThe adjacent atom for which to return a pointer to the connecting bond.
Returns
A pointer to the const bond that connects this atom to the argument atom, or nullptr if the argument atom is not connected.

Implements CDPL::Chem::Atom.

◆ findBondToAtom() [2/2]

Bond* CDPL::Chem::BasicAtom::findBondToAtom ( const Atom &  atom)
virtual

Returns a pointer to the non-const bond that connects this atom to the argument atom.

Parameters
atomThe adjacent atom for which to return a pointer to the connecting bond.
Returns
A pointer to the non-const bond that connects this atom to the argument atom, or nullptr if the argument atom is not connected.

Implements CDPL::Chem::Atom.

◆ getAtom() [1/2]

const Atom& CDPL::Chem::BasicAtom::getAtom ( std::size_t  idx) const
virtual

Returns a const reference to the connected atom at index idx.

Parameters
idxThe index of the atom to return.
Returns
A const reference to the connected atom at index idx.
Exceptions
Base::IndexErrorif idx is not in the range [0, getNumAtoms()).
Note
The order of connected atoms corresponds to the order of connecting bonds.

Implements CDPL::Chem::Atom.

◆ getAtom() [2/2]

Atom& CDPL::Chem::BasicAtom::getAtom ( std::size_t  idx)
virtual

Returns a non-const reference to the connected atom at index idx.

Parameters
idxThe index of the atom to return.
Returns
A non-const reference to the connected atom at index idx.
Exceptions
Base::IndexErrorif idx is not in the range [0, getNumAtoms()).
Note
The order of connected atoms corresponds to the order of connecting bonds.

Implements CDPL::Chem::Atom.

◆ getAtomsBegin() [1/2]

ConstAtomIterator CDPL::Chem::BasicAtom::getAtomsBegin ( ) const

Returns a constant iterator pointing to the beginning of the connected const Chem::BasicAtom instances.

Returns
A constant iterator pointing to the beginning of the connected const Chem::BasicAtom instances.

◆ getAtomsBegin() [2/2]

AtomIterator CDPL::Chem::BasicAtom::getAtomsBegin ( )

Returns a mutable iterator pointing to the end of the connected Chem::BasicAtom instances.

Returns
A mutable iterator pointing to the end of the connected Chem::BasicAtom instances.

◆ getAtomsEnd() [1/2]

ConstAtomIterator CDPL::Chem::BasicAtom::getAtomsEnd ( ) const

Returns a constant iterator pointing to the end of the connected const Chem::BasicAtom instances.

Returns
A constant iterator pointing to the end of the connected const Chem::BasicAtom instances.

◆ getAtomsEnd() [2/2]

AtomIterator CDPL::Chem::BasicAtom::getAtomsEnd ( )

Returns a mutable iterator pointing to the end of the connected Chem::BasicAtom instances.

Returns
A mutable iterator pointing to the end of the connected Chem::BasicAtom instances.

◆ getBondsBegin() [1/2]

ConstBondIterator CDPL::Chem::BasicAtom::getBondsBegin ( ) const

Returns a constant iterator pointing to the beginning of the incident const Chem::BasicBond instances.

Returns
A constant iterator pointing to the beginning of the incident const Chem::BasicBond instances.

◆ getBondsBegin() [2/2]

BondIterator CDPL::Chem::BasicAtom::getBondsBegin ( )

Returns a mutable iterator pointing to the beginning of the incident Chem::BasicBond instances.

Returns
A mutable iterator pointing to the beginning of the incident Chem::BasicBond instances.

◆ getBondsEnd() [1/2]

ConstBondIterator CDPL::Chem::BasicAtom::getBondsEnd ( ) const

Returns a constant iterator pointing to the end of the incident const Chem::BasicBond instances.

Returns
A constant iterator pointing to the end of the incident const Chem::BasicBond instances.

◆ getBondsEnd() [2/2]

BondIterator CDPL::Chem::BasicAtom::getBondsEnd ( )

Returns a mutable iterator pointing to the end of the incident Chem::BasicBond instances.

Returns
A mutable iterator pointing to the end of the incident Chem::BasicBond instances.

◆ containsAtom()

bool CDPL::Chem::BasicAtom::containsAtom ( const Atom &  atom) const
virtual

Tells whether this atom and the specified atom are connected by a bond.

Parameters
atomThe atom to test for adjacency.
Returns
true if the argument atom is connected to this atom, and false otherwise.

Implements CDPL::Chem::Atom.

◆ containsBond()

bool CDPL::Chem::BasicAtom::containsBond ( const Bond &  bond) const
virtual

Tells whether the specified bond is incident to this atom.

Parameters
bondThe bond to test for incidence.
Returns
true if the argument bond is incident to this atom, and false otherwise.

Implements CDPL::Chem::Atom.

◆ getAtomIndex()

std::size_t CDPL::Chem::BasicAtom::getAtomIndex ( const Atom &  atom) const
virtual

Returns the index of the specified connected atom.

Parameters
atomThe connected atom for which to return the index.
Returns
The zero-based index of the specified atom.
Exceptions
Base::ItemNotFoundif the specified atom is not connected to this atom.

Implements CDPL::Chem::Atom.

◆ getBondIndex()

std::size_t CDPL::Chem::BasicAtom::getBondIndex ( const Bond &  bond) const
virtual

Returns the index of the specified incident bond.

Parameters
bondThe bond for which to return the index.
Returns
The zero-based index of the specified bond.
Exceptions
Base::ItemNotFoundif the specified bond is not incident to this atom.

Implements CDPL::Chem::Atom.

◆ getIndex()

std::size_t CDPL::Chem::BasicAtom::getIndex ( ) const
virtual

Returns the index of the atom in its parent molecule.

Returns
The zero-based index of the atom.

Implements CDPL::Chem::Atom.

◆ orderAtoms()

void CDPL::Chem::BasicAtom::orderAtoms ( const AtomCompareFunction &  func)
virtual

Orders the atoms according to criteria implemented by the provided atom comparison function.

Parameters
funcThe atom comparison function implementing the applied ordering criteria.

Implements CDPL::Chem::AtomContainer.

◆ orderBonds()

void CDPL::Chem::BasicAtom::orderBonds ( const BondCompareFunction &  func)
virtual

Orders the bonds according to criteria implemented by the provided bond comparison function.

Parameters
funcThe bond comparison function implementing the applied ordering criteria.

Implements CDPL::Chem::BondContainer.

◆ operator=() [1/2]

BasicAtom& CDPL::Chem::BasicAtom::operator= ( const BasicAtom &  atom)

Assignment operator that replaces the current set of properties with the properties of atom.

Parameters
atomThe atom whose properties get copied.
Returns
A reference to itself.

◆ operator=() [2/2]

Atom& CDPL::Chem::Atom::operator=

Assignment operator that replaces the current set of properties with the properties of atom.

Parameters
atomThe atom whose properties get copied.
Returns
A reference to itself.

Friends And Related Function Documentation

◆ BasicMolecule

friend class BasicMolecule
friend

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