Chemical Data Processing Library C++ API - Version 1.1.1
Public Types | List of all members
CDPL::Chem::BondMapping Class Reference

A data type for the storage and lookup of arbitrary bond to bond mappings. More...

#include <BondMapping.hpp>

+ Inheritance diagram for CDPL::Chem::BondMapping:

Public Types

typedef std::shared_ptr< BondMappingSharedPointer
 
- Public Types inherited from CDPL::Util::MultiMap< const Bond *, const Bond *, true >
typedef std::shared_ptr< MultiMapSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MultiMap instances. More...
 
typedef const Bond * KeyType
 The type of the map's keys. More...
 
typedef const Bond * ValueType
 The type of the mapped values. More...
 
typedef StorageType::value_type Entry
 The type of the key/value pairs stored in the map. More...
 
typedef StorageType::const_iterator ConstEntryIterator
 A constant iterator used to iterate over the entries of the map. More...
 
typedef StorageType::const_reverse_iterator ConstReverseEntryIterator
 A constant iterator used to iterate backwards over the entries of the map. More...
 
typedef StorageType::iterator EntryIterator
 A mutable iterator used to iterate over the entries of the map. More...
 
typedef StorageType::reverse_iterator ReverseEntryIterator
 A mutable iterator used to iterate backwards over the entries of the map. More...
 
typedef std::pair< EntryIterator, EntryIteratorEntryIteratorRange
 A pair of mutable iterators used to specify the start and end of a range of entries. More...
 
typedef std::pair< ConstEntryIterator, ConstEntryIteratorConstEntryIteratorRange
 A pair of constant iterators used to specify the start and end of a range of entries. More...
 

Additional Inherited Members

- Public Member Functions inherited from CDPL::Util::MultiMap< const Bond *, const Bond *, true >
 MultiMap ()
 Creates an empty map. More...
 
 MultiMap (const std::less< const Bond * > &func)
 Creates an empty map and uses func as key compare function. More...
 
 MultiMap (const InputIter &first, const InputIter &last)
 Creates and initializes the map with copies of the key value pairs in the range [first, last). More...
 
 MultiMap (const InputIter &first, const InputIter &last, const std::less< const Bond * > &func)
 Creates and initializes the map with copies of the key value pairs in the range [first, last) and uses func as key compare function. More...
 
virtual ~MultiMap ()
 Virtual destructor. More...
 
StorageType & getData ()
 
const StorageType & getData () const
 
std::size_t getSize () const
 Returns the size (number of entries) of the map. More...
 
bool isEmpty () const
 Tells whether the map is empty (getSize() == 0). More...
 
void clear ()
 Erases all entries. More...
 
void swap (MultiMap &map)
 Swaps the contents with map. More...
 
std::less< const Bond * > getKeyCompareFunction () const
 Returns the key compare function used by the map. More...
 
std::size_t getNumEntries (const const Bond * &key) const
 Returns the number of entries with the specified key. More...
 
EntryIteratorRange getEntries (const const Bond * &key)
 Returns the bounds of a range that includes all entries with a key that compares equal to the specified key. More...
 
ConstEntryIteratorRange getEntries (const const Bond * &key) const
 Returns the bounds of a range that includes all entries with a key that compares equal to the specified key. More...
 
EntryIterator getEntry (const const Bond * &key)
 Returns a mutable iterator pointing to the first entry with the specified key. More...
 
ConstEntryIterator getEntry (const const Bond * &key) const
 Returns a constant iterator pointing to the first entry with the specified key. More...
 
const Bond * & getValue (const const Bond * &key)
 Returns a non-const reference to the first value associated with the specified key. More...
 
const Bond * & getValue (const const Bond * &key, const Bond * &def_value)
 Returns a non-const reference to the first value associated with the specified key, or the value given by the second argument if an entry with the given key does not exist. More...
 
const const Bond * & getValue (const const Bond * &key) const
 Returns a const reference to the first value associated with the specified key. More...
 
const const Bond * & getValue (const const Bond * &key, const const Bond * &def_value) const
 Returns a const reference to the first value associated with the specified key, or the value given by the second argument if an entry with the given key does not exist. More...
 
const Bond * & operator[] (const const Bond * &key)
 Returns a non-const reference to the first value associated with the specified key. More...
 
const const Bond * & operator[] (const const Bond * &key) const
 Returns a const reference to the first value associated with the specified key. More...
 
void removeEntry (const EntryIterator &it)
 Removes the entry pointed to by the iterator it from the map. More...
 
bool removeEntry (const const Bond * &key)
 Removes the first entry with the specified key from the map. More...
 
void removeEntries (const EntryIterator &first, const EntryIterator &last)
 Removes all entries pointed to by the iterators in the range [first, last) from the map. More...
 
std::size_t removeEntries (const const Bond * &key)
 Removes all entries with the specified key from the map. More...
 
EntryIterator insertEntry (const Entry &item)
 Inserts the key/value pair item into the map. More...
 
EntryIterator insertEntry (const const Bond * &key, const const Bond * &value)
 Inserts a new entry with specified key and value into the map. More...
 
EntryIterator insertEntry (const EntryIterator &it, const Entry &item)
 Inserts the key/value pair item into the map and uses the iterator it as a hint for the insertion location. More...
 
EntryIterator insertEntry (const EntryIterator &it, const const Bond * &key, const const Bond * &value)
 Inserts a new entry with the specified key and value into the map and uses the iterator it as a hint for the insertion location. More...
 
EntryIterator setEntry (const Entry &item)
 Replaces all entries with a key equivalent to that of item with a single entry specified by item. More...
 
EntryIterator setEntry (const const Bond * &key, const const Bond * &value)
 Replaces all entries with a key equivalent to key with a single copy of the key/value pair (key, value). More...
 
void insertEntries (const InputIter &first, const InputIter &last)
 Inserts the key/value pairs in the range [first, last) into the map. More...
 
void setEntries (const InputIter &first, const InputIter &last)
 Inserts new entries or updates the value of existing entries using the key/value pairs in the range [first, last). More...
 
EntryIterator getLowerBound (const const Bond * &key)
 Returns a mutable iterator pointing to the first entry whose key is not less than the specified key. More...
 
ConstEntryIterator getLowerBound (const const Bond * &key) const
 Returns a constant iterator pointing to the first entry whose key is not less than the specified key. More...
 
EntryIterator getUpperBound (const const Bond * &key)
 Returns a mutable iterator pointing to the first entry whose key is greater than the specified key. More...
 
ConstEntryIterator getUpperBound (const const Bond * &key) const
 Returns a constant iterator pointing to the first entry whose key is greater than the specified key. More...
 
ConstEntryIterator getEntriesBegin () const
 Returns a constant iterator pointing to the beginning of the map. More...
 
EntryIterator getEntriesBegin ()
 Returns a mutable iterator pointing to the beginning of the map. More...
 
ConstEntryIterator getEntriesEnd () const
 Returns a constant iterator pointing to the end of the map. More...
 
EntryIterator getEntriesEnd ()
 Returns a mutable iterator pointing to the end of the map. More...
 
ConstEntryIterator begin () const
 Returns a constant iterator pointing to the beginning of the map. More...
 
EntryIterator begin ()
 Returns a mutable iterator pointing to the beginning of the map. More...
 
ConstEntryIterator end () const
 Returns a constant iterator pointing to the end of the map. More...
 
EntryIterator end ()
 Returns a mutable iterator pointing to the end of the map. More...
 
ConstReverseEntryIterator getEntriesReverseBegin () const
 Returns a constant iterator pointing to the beginning of the reversed map. More...
 
ReverseEntryIterator getEntriesReverseBegin ()
 Returns a mutable iterator pointing to the beginning of the reversed map. More...
 
ConstReverseEntryIterator getEntriesReverseEnd () const
 Returns a constant iterator pointing to the end of the reversed map. More...
 
ReverseEntryIterator getEntriesReverseEnd ()
 Returns a mutable iterator pointing to the end of the reversed map. More...
 
- Protected Member Functions inherited from CDPL::Util::MultiMap< const Bond *, const Bond *, true >
virtual const char * getClassName () const
 Returns the name of the (derived) Map class. More...
 

Detailed Description

A data type for the storage and lookup of arbitrary bond to bond mappings.

Bonds mappings are stored as pairs of pointers to the mapped const Chem::Bond objects. Mappings do not have to be unique and multiple mappings of a given bond to other bonds are possible. If a mapping entry for a particular bond does not exist, the methods BondMapping::getValue() and BondMapping::operator[]() return a null pointer to indicate that the lookup of the mapped bond has failed.

Member Typedef Documentation

◆ SharedPointer


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