Chemical Data Processing Library C++ API - Version 1.1.1
|
A data type for the storage and lookup of arbitrary atom to atom mappings. More...
#include <AtomMapping.hpp>
Public Types | |
typedef std::shared_ptr< AtomMapping > | SharedPointer |
Public Types inherited from CDPL::Util::MultiMap< const Atom *, const Atom *, true > | |
typedef std::shared_ptr< MultiMap > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated MultiMap instances. More... | |
typedef const Atom * | KeyType |
The type of the map's keys. More... | |
typedef const Atom * | 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, EntryIterator > | EntryIteratorRange |
A pair of mutable iterators used to specify the start and end of a range of entries. More... | |
typedef std::pair< ConstEntryIterator, ConstEntryIterator > | ConstEntryIteratorRange |
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 Atom *, const Atom *, true > | |
MultiMap () | |
Creates an empty map. More... | |
MultiMap (const std::less< const Atom * > &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 Atom * > &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 Atom * > | getKeyCompareFunction () const |
Returns the key compare function used by the map. More... | |
std::size_t | getNumEntries (const const Atom * &key) const |
Returns the number of entries with the specified key. More... | |
EntryIteratorRange | getEntries (const const Atom * &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 Atom * &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 Atom * &key) |
Returns a mutable iterator pointing to the first entry with the specified key. More... | |
ConstEntryIterator | getEntry (const const Atom * &key) const |
Returns a constant iterator pointing to the first entry with the specified key. More... | |
const Atom * & | getValue (const const Atom * &key) |
Returns a non-const reference to the first value associated with the specified key. More... | |
const Atom * & | getValue (const const Atom * &key, const Atom * &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 Atom * & | getValue (const const Atom * &key) const |
Returns a const reference to the first value associated with the specified key. More... | |
const const Atom * & | getValue (const const Atom * &key, const const Atom * &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 Atom * & | operator[] (const const Atom * &key) |
Returns a non-const reference to the first value associated with the specified key. More... | |
const const Atom * & | operator[] (const const Atom * &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 Atom * &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 Atom * &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 Atom * &key, const const Atom * &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 Atom * &key, const const Atom * &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 Atom * &key, const const Atom * &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 Atom * &key) |
Returns a mutable iterator pointing to the first entry whose key is not less than the specified key. More... | |
ConstEntryIterator | getLowerBound (const const Atom * &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 Atom * &key) |
Returns a mutable iterator pointing to the first entry whose key is greater than the specified key. More... | |
ConstEntryIterator | getUpperBound (const const Atom * &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 Atom *, const Atom *, true > | |
virtual const char * | getClassName () const |
Returns the name of the (derived) Map class. More... | |
A data type for the storage and lookup of arbitrary atom to atom mappings.
Atoms mappings are stored as pairs of pointers to the mapped const
Chem::Atom objects. Mappings do not have to be unique and multiple mappings of a given atom to other atoms are possible. If a mapping entry for a particular atom does not exist, the methods AtomMapping::getValue() and AtomMapping::operator[]() return a null pointer to indicate that the lookup of the mapped atom has failed.
typedef std::shared_ptr<AtomMapping> CDPL::Chem::AtomMapping::SharedPointer |