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

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

#include <FeatureMapping.hpp>

+ Inheritance diagram for CDPL::Pharm::FeatureMapping:

Public Types

typedef std::shared_ptr< FeatureMappingSharedPointer
 
- Public Types inherited from CDPL::Util::MultiMap< const Feature *, const Feature *, true >
typedef std::shared_ptr< MultiMapSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MultiMap instances. More...
 
typedef const Feature * KeyType
 The type of the map's keys. More...
 
typedef const Feature * 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 Feature *, const Feature *, true >
 MultiMap ()
 Creates an empty map. More...
 
 MultiMap (const std::less< const Feature * > &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 Feature * > &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 Feature * > getKeyCompareFunction () const
 Returns the key compare function used by the map. More...
 
std::size_t getNumEntries (const const Feature * &key) const
 Returns the number of entries with the specified key. More...
 
EntryIteratorRange getEntries (const const Feature * &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 Feature * &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 Feature * &key)
 Returns a mutable iterator pointing to the first entry with the specified key. More...
 
ConstEntryIterator getEntry (const const Feature * &key) const
 Returns a constant iterator pointing to the first entry with the specified key. More...
 
const Feature * & getValue (const const Feature * &key)
 Returns a non-const reference to the first value associated with the specified key. More...
 
const Feature * & getValue (const const Feature * &key, const Feature * &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 Feature * & getValue (const const Feature * &key) const
 Returns a const reference to the first value associated with the specified key. More...
 
const const Feature * & getValue (const const Feature * &key, const const Feature * &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 Feature * & operator[] (const const Feature * &key)
 Returns a non-const reference to the first value associated with the specified key. More...
 
const const Feature * & operator[] (const const Feature * &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 Feature * &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 Feature * &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 Feature * &key, const const Feature * &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 Feature * &key, const const Feature * &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 Feature * &key, const const Feature * &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 Feature * &key)
 Returns a mutable iterator pointing to the first entry whose key is not less than the specified key. More...
 
ConstEntryIterator getLowerBound (const const Feature * &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 Feature * &key)
 Returns a mutable iterator pointing to the first entry whose key is greater than the specified key. More...
 
ConstEntryIterator getUpperBound (const const Feature * &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 Feature *, const Feature *, 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 feature to feature mappings.

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

Member Typedef Documentation

◆ SharedPointer


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