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

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

#include <Entity3DMapping.hpp>

+ Inheritance diagram for CDPL::Chem::Entity3DMapping:

Public Types

typedef std::shared_ptr< Entity3DMappingSharedPointer
 
- Public Types inherited from CDPL::Util::MultiMap< const Entity3D *, const Entity3D *, true >
typedef std::shared_ptr< MultiMapSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MultiMap instances. More...
 
typedef const Entity3D * KeyType
 The type of the map's keys. More...
 
typedef const Entity3D * 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...
 

Public Member Functions

 Entity3DMapping ()
 
- Public Member Functions inherited from CDPL::Util::MultiMap< const Entity3D *, const Entity3D *, true >
 MultiMap ()
 Creates an empty map. More...
 
 MultiMap (const std::less< const Entity3D * > &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 Entity3D * > &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 Entity3D * > getKeyCompareFunction () const
 Returns the key compare function used by the map. More...
 
std::size_t getNumEntries (const const Entity3D * &key) const
 Returns the number of entries with the specified key. More...
 
EntryIteratorRange getEntries (const const Entity3D * &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 Entity3D * &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 Entity3D * &key)
 Returns a mutable iterator pointing to the first entry with the specified key. More...
 
ConstEntryIterator getEntry (const const Entity3D * &key) const
 Returns a constant iterator pointing to the first entry with the specified key. More...
 
const Entity3D * & getValue (const const Entity3D * &key)
 Returns a non-const reference to the first value associated with the specified key. More...
 
const Entity3D * & getValue (const const Entity3D * &key, const Entity3D * &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 Entity3D * & getValue (const const Entity3D * &key) const
 Returns a const reference to the first value associated with the specified key. More...
 
const const Entity3D * & getValue (const const Entity3D * &key, const const Entity3D * &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 Entity3D * & operator[] (const const Entity3D * &key)
 Returns a non-const reference to the first value associated with the specified key. More...
 
const const Entity3D * & operator[] (const const Entity3D * &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 Entity3D * &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 Entity3D * &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 Entity3D * &key, const const Entity3D * &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 Entity3D * &key, const const Entity3D * &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 Entity3D * &key, const const Entity3D * &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 Entity3D * &key)
 Returns a mutable iterator pointing to the first entry whose key is not less than the specified key. More...
 
ConstEntryIterator getLowerBound (const const Entity3D * &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 Entity3D * &key)
 Returns a mutable iterator pointing to the first entry whose key is greater than the specified key. More...
 
ConstEntryIterator getUpperBound (const const Entity3D * &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...
 

Additional Inherited Members

- Protected Member Functions inherited from CDPL::Util::MultiMap< const Entity3D *, const Entity3D *, 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 entity to entity mappings.

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

Member Typedef Documentation

◆ SharedPointer

Constructor & Destructor Documentation

◆ Entity3DMapping()

CDPL::Chem::Entity3DMapping::Entity3DMapping ( )

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