Chemical Data Processing Library C++ API - Version 1.2.0
|
A multiple sorted associative container that maps keys to values. More...
#include <MultiMap.hpp>
Public Types | |
typedef std::shared_ptr< MultiMap > | SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated MultiMap instances. More... | |
typedef Key | KeyType |
The type of the map's keys. More... | |
typedef Value | 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... | |
Public Member Functions | |
MultiMap () | |
Creates an empty map. More... | |
MultiMap (const KeyCompFunc &func) | |
Creates an empty map and uses func as key compare function. More... | |
template<typename InputIter > | |
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... | |
template<typename InputIter > | |
MultiMap (const InputIter &first, const InputIter &last, const KeyCompFunc &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... | |
KeyCompFunc | getKeyCompareFunction () const |
Returns the key compare function used by the map. More... | |
std::size_t | getNumEntries (const Key &key) const |
Returns the number of entries with the specified key. More... | |
EntryIteratorRange | getEntries (const Key &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 Key &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 Key &key) |
Returns a mutable iterator pointing to the first entry with the specified key. More... | |
ConstEntryIterator | getEntry (const Key &key) const |
Returns a constant iterator pointing to the first entry with the specified key. More... | |
Value & | getValue (const Key &key) |
Returns a non-const reference to the first value associated with the specified key. More... | |
Value & | getValue (const Key &key, Value &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 Value & | getValue (const Key &key) const |
Returns a const reference to the first value associated with the specified key. More... | |
const Value & | getValue (const Key &key, const Value &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... | |
Value & | operator[] (const Key &key) |
Returns a non-const reference to the first value associated with the specified key. More... | |
const Value & | operator[] (const Key &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 Key &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 Key &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 Key &key, const Value &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 Key &key, const Value &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 Key &key, const Value &value) |
Replaces all entries with a key equivalent to key with a single copy of the key/value pair (key, value). More... | |
template<typename InputIter > | |
void | insertEntries (const InputIter &first, const InputIter &last) |
Inserts the key/value pairs in the range [first, last) into the map. More... | |
template<typename InputIter > | |
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 Key &key) |
Returns a mutable iterator pointing to the first entry whose key is not less than the specified key. More... | |
ConstEntryIterator | getLowerBound (const Key &key) const |
Returns a constant iterator pointing to the first entry whose key is not less than the specified key. More... | |
EntryIterator | getUpperBound (const Key &key) |
Returns a mutable iterator pointing to the first entry whose key is greater than the specified key. More... | |
ConstEntryIterator | getUpperBound (const Key &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 | |
virtual const char * | getClassName () const |
Returns the name of the (derived) Map class. More... | |
A multiple sorted associative container that maps keys to values.
Since MultiMap
is a sorted associative container, it uses an ordering relation on its keys. Two keys are considered to be equivalent if neither one is less than the other. MultiMap
guarantees that the complexity for most operations is never worse than logarithmic, and the entries are always sorted in ascending order by key. It is also a multiple associative container, meaning that there is no limit on the number of entries with the same key. MultiMap
has the important property that inserting a new entry does not invalidate iterators that point to existing entries. Erasing an entry also does not invalidate any iterators, except, of course, for iterators that actually point to the entry that is being erased.
Key | The type of the map's keys. |
Value | The type of the mapped values. |
AllowDefValues | Whether to return a default value or to throw an exception if a key/value entry is not present in the map. |
KeyCompFunc | The type of a functor class used to establish the strictly weak ordering on the map's keys. The functor has to return true if the first argument is less than the second one, and false otherwise. |
typedef std::shared_ptr<MultiMap> CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::SharedPointer |
A reference-counted smart pointer [SHPTR] for dynamically allocated MultiMap
instances.
typedef Key CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::KeyType |
The type of the map's keys.
typedef Value CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ValueType |
The type of the mapped values.
typedef StorageType::value_type CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::Entry |
The type of the key/value pairs stored in the map.
The member Entry::first
is the const
key object of type Key and the member Entry::second
is the associated value object of type Value.
typedef StorageType::const_iterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator |
A constant iterator used to iterate over the entries of the map.
typedef StorageType::const_reverse_iterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstReverseEntryIterator |
A constant iterator used to iterate backwards over the entries of the map.
typedef StorageType::iterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator |
A mutable iterator used to iterate over the entries of the map.
typedef StorageType::reverse_iterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ReverseEntryIterator |
A mutable iterator used to iterate backwards over the entries of the map.
typedef std::pair<EntryIterator, EntryIterator> CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIteratorRange |
A pair of mutable iterators used to specify the start and end of a range of entries.
typedef std::pair<ConstEntryIterator, ConstEntryIterator> CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIteratorRange |
A pair of constant iterators used to specify the start and end of a range of entries.
|
inline |
Creates an empty map.
|
inline |
Creates an empty map and uses func as key compare function.
func | The key compare function to use. |
|
inline |
Creates and initializes the map with copies of the key value pairs in the range [first, last).
first | The start of the range. |
last | The end of the range. |
|
inline |
Creates and initializes the map with copies of the key value pairs in the range [first, last) and uses func as key compare function.
first | The start of the range. |
last | The end of the range. |
func | The key compare function to use. |
|
inlinevirtual |
Virtual destructor.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::StorageType & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getData |
const CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::StorageType & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getData |
std::size_t CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getSize |
Returns the size (number of entries) of the map.
bool CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::isEmpty |
Tells whether the map is empty (getSize() == 0).
true
if the map is empty, and false
otherwise. void CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::clear |
Erases all entries.
void CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::swap | ( | MultiMap< Key, Value, AllowDefValues, KeyCompFunc > & | map | ) |
Swaps the contents with map.
map | The other map with which the contents will be exchanged. |
KeyCompFunc CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getKeyCompareFunction |
Returns the key compare function used by the map.
std::size_t CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getNumEntries | ( | const Key & | key | ) | const |
Returns the number of entries with the specified key.
key | The key of the entries to count. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIteratorRange CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntries | ( | const Key & | key | ) |
Returns the bounds of a range that includes all entries with a key that compares equal to the specified key.
If key does not match any key in the container, the range returned has a length of zero, with both iterators pointing to the entry with the nearest key greater than key, if any, or to getEntriesEnd() if key is greater than all the keys in the map.
key | The key specifying the entries. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIteratorRange CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntries | ( | const Key & | key | ) | const |
Returns the bounds of a range that includes all entries with a key that compares equal to the specified key.
If key does not match any key in the container, the range returned has a length of zero, with both iterators pointing to the entry with the nearest key greater than the specified key, if any, or to getEntriesEnd() if key is greater than all the keys in the map.
key | The key specifying the entries. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntry | ( | const Key & | key | ) |
Returns a mutable iterator pointing to the first entry with the specified key.
If the map does not contain an entry with the specified key, an iterator pointing one past the last entry of the map (== getEntriesEnd()
) is returned.
key | The key specifying the entry. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntry | ( | const Key & | key | ) | const |
Returns a constant iterator pointing to the first entry with the specified key.
If the map does not contain an entry with the specified key, an iterator pointing one past the last entry of the map (== getEntriesEnd()
) is returned.
key | The key specifying the entry. |
Value & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getValue | ( | const Key & | key | ) |
Returns a non-const
reference to the first value associated with the specified key.
If the map contains an entry with the specified key, a reference to the associated value is returned. If the map does not contain the entry and default values are enabled (that is, the template parameter AllowDefValues is true
), a new map entry is created which associates key with the default constructed value object. Otherwise, Base::ItemNotFound is thrown to indicate the error.
key | The key associated with the requested value. |
const
reference to the requested value. Base::ItemNotFound | if AllowDefValues is false and the map does not contain an entry with the specified key. |
Value & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getValue | ( | const Key & | key, |
Value & | 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.
If the map contains an entry with the specified key, a reference to the associated value is returned. If the map does not contain the entry, the second argument def_value is returned.
key | The key associated with the requested value. |
def_value | The value which is returned if the specified entry does not exist. |
const
reference to the requested or default value. const Value & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getValue | ( | const Key & | key | ) | const |
Returns a const
reference to the first value associated with the specified key.
If the map contains the specified entry, a reference to the associated value is returned. If the map does not contain the entry and default values are enabled (that is, the template parameter AllowDefValues is true
), a const
reference to a default constructed value object is returned. Otherwise, Base::ItemNotFound is thrown to indicate the error.
key | The key associated with the requested value. |
const
reference to the requested value. Base::ItemNotFound | if AllowDefValues is false and the map does not contain an entry with the specified key. |
const Value & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getValue | ( | const Key & | key, |
const Value & | 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.
If the map contains an entry with the specified key, a reference to the associated value is returned. If the map does not contain the entry, the second argument def_value is returned.
key | The key associated with the requested value. |
def_value | The value which is returned if the specified entry does not exist. |
const
reference to the requested or default value. Value & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::operator[] | ( | const Key & | key | ) |
Returns a non-const
reference to the first value associated with the specified key.
The method is equivalent to getValue(const Key&).
key | The key associated with the requested value. |
const
reference to the requested value. Base::ItemNotFound | if AllowDefValues is false and the map does not contain an entry with the specified key. |
const Value & CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::operator[] | ( | const Key & | key | ) | const |
Returns a const
reference to the first value associated with the specified key.
The method is equivalent to getValue(const Key&) const.
key | The key associated with the requested value. |
const
reference to the requested value. Base::ItemNotFound | if AllowDefValues is false and the map does not contain an entry with the specified key. |
void CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::removeEntry | ( | const EntryIterator & | it | ) |
Removes the entry pointed to by the iterator it from the map.
it | The iterator pointing to the entry to remove. |
bool CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::removeEntry | ( | const Key & | key | ) |
Removes the first entry with the specified key from the map.
key | The key specifying the entry to remove. |
void CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::removeEntries | ( | const EntryIterator & | first, |
const EntryIterator & | last | ||
) |
Removes all entries pointed to by the iterators in the range [first, last) from the map.
first | The start of the range. |
last | The end of the range. |
std::size_t CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::removeEntries | ( | const Key & | key | ) |
Removes all entries with the specified key from the map.
key | The key specifying the entries to remove. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::insertEntry | ( | const Entry & | item | ) |
Inserts the key/value pair item into the map.
item | The key/value pair to insert. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::insertEntry | ( | const Key & | key, |
const Value & | value | ||
) |
Inserts a new entry with specified key and value into the map.
key | The key of the entry to insert. |
value | The value associated with key |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::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.
The return value is a dereferenceable iterator that points to the entry with a key that is equivalent to that of item.
it | An iterator pointing to a location where the insertion position search will begin. |
item | The key/value pair to insert. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::insertEntry | ( | const EntryIterator & | it, |
const Key & | key, | ||
const Value & | 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.
The argument it is a hint and points to the location where the insertion position search will begin. The return value is a dereferenceable iterator that points to the entry with a key that is equivalent to the specified key.
it | An iterator pointing to a location where the insertion position search will begin. |
key | The key of the entry to insert. |
value | The value associated with key |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::setEntry | ( | const Entry & | item | ) |
Replaces all entries with a key equivalent to that of item with a single entry specified by item.
If no entries with a key equivalent to that of item exist, setEntry(item)
is equivalent to insertEntry(item)
.
item | The key/value pair to insert or with which existing entries will be replaced. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::setEntry | ( | const Key & | key, |
const Value & | value | ||
) |
Replaces all entries with a key equivalent to key with a single copy of the key/value pair (key, value).
If no entries with a key equivalent to the specified key exist, setEntry(k, v)
is equivalent to insertEntry(k, v)
.
key | The key of the entries to replace. |
value | The value associated with key. |
void CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::insertEntries | ( | const InputIter & | first, |
const InputIter & | last | ||
) |
Inserts the key/value pairs in the range [first, last) into the map.
This is equivalent to calling insertEntry(const Entry&) for each key/value pair i that is pointed to by an iterator in the range [first, last).
first | The start of the range. |
last | The end of the range. |
void CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::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).
This is equivalent to calling setEntry(const Entry&) for each key/value pair i that is pointed to by an iterator in the range [first, last).
first | The start of the range. |
last | The end of the range. |
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getLowerBound | ( | const Key & | key | ) |
Returns a mutable iterator pointing to the first entry whose key is not less than the specified key.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getLowerBound | ( | const Key & | key | ) | const |
Returns a constant iterator pointing to the first entry whose key is not less than the specified key.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getUpperBound | ( | const Key & | key | ) |
Returns a mutable iterator pointing to the first entry whose key is greater than the specified key.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getUpperBound | ( | const Key & | key | ) | const |
Returns a constant iterator pointing to the first entry whose key is greater than the specified key.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesBegin |
Returns a constant iterator pointing to the beginning of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesBegin |
Returns a mutable iterator pointing to the beginning of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesEnd |
Returns a constant iterator pointing to the end of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesEnd |
Returns a mutable iterator pointing to the end of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::begin |
Returns a constant iterator pointing to the beginning of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::begin |
Returns a mutable iterator pointing to the beginning of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::end |
Returns a constant iterator pointing to the end of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::EntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::end |
Returns a mutable iterator pointing to the end of the map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstReverseEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesReverseBegin |
Returns a constant iterator pointing to the beginning of the reversed map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ReverseEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesReverseBegin |
Returns a mutable iterator pointing to the beginning of the reversed map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ConstReverseEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesReverseEnd |
Returns a constant iterator pointing to the end of the reversed map.
CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::ReverseEntryIterator CDPL::Util::MultiMap< Key, Value, AllowDefValues, KeyCompFunc >::getEntriesReverseEnd |
Returns a mutable iterator pointing to the end of the reversed map.
|
protectedvirtual |
Returns the name of the (derived) Map class.
Overriding this method provides an easy way to customize exception messages with the name of a derived class. Consider the class MyMultiMap
which inherits publicly from MultiMap<int, int>
and overrides getClassName():
If, for example, the requested value for a particular key is not found, the error message of the thrown Base::ItemNotFound exception will now start with "MyMultiMap: ...." instead of the default "MultiMap: ....".