Data Structures | Functions

# multimap.hpp File Reference

Multimap with deterministic ordering of items with equal keys. More...

`#include <map>`
`#include <list>`

Go to the source code of this file.

## Data Structures
class | MultiMapIterator< Tmap_iter, Tlist_iter, Tkey, Tvalue, Tcompare >
| STL-style iterator for MultiMap. More...
class | MultiMap< Tkey, Tvalue, Tcompare >
| Hand-rolled multimap as map of lists. More...
## Functions
template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tlist_iter2 , class Tkey , class Tvalue1 , class Tvalue2 , class Tcompare >
bool | operator== (const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue1, Tcompare > &iter1, const MultiMapIterator< Tmap_iter2, Tlist_iter2, Tkey, Tvalue2, Tcompare > &iter2)
| Compare two MultiMap iterators.
template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tlist_iter2 , class Tkey , class Tvalue1 , class Tvalue2 , class Tcompare >
bool | operator!= (const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue1, Tcompare > &iter1, const MultiMapIterator< Tmap_iter2, Tlist_iter2, Tkey, Tvalue2, Tcompare > &iter2)
| Inverse of operator==().
template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >
bool | operator== (const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > &iter1, const Tmap_iter2 &iter2)
| Check if a MultiMap iterator is at the begin of a list pointed to by the given map iterator.
template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >
bool | operator!= (const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > &iter1, const Tmap_iter2 &iter2)
| Inverse of operator==() with same signature.
template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >
bool | operator== (const Tmap_iter2 &iter2, const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > &iter1)
| Same as operator==() with reversed order of arguments.
template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >
bool | operator!= (const Tmap_iter2 &iter2, const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > &iter1)
| Same as operator!=() with reversed order of arguments.

## Detailed Description

Multimap with deterministic ordering of items with equal keys.

Definition in file multimap.hpp.

## Function Documentation

template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tlist_iter2 , class Tkey , class Tvalue1 , class Tvalue2 , class Tcompare >

bool operator!= | ( | const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue1, Tcompare > & | iter1,
|  | const MultiMapIterator< Tmap_iter2, Tlist_iter2, Tkey, Tvalue2, Tcompare > & | iter2 |
| ) |  |  |

Inverse of operator==().

Lots of template parameters to make all possible const and non-const types of MultiMap iterators (on maps with const and non-const values) comparable to each other.

Parameters:

  | iter1 | First iterator to compare.
  | iter2 | Second iterator to compare.

Returns:
  If iter1 and iter2 are not equal.

Definition at line 232 of file multimap.hpp.

template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >

bool operator!= | ( | const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > & | iter1,
|  | const Tmap_iter2 & | iter2 |
| ) |  |  |

Inverse of operator==() with same signature.

Parameters:

  | iter1 | MultiMap iterator.
  | iter2 | Map iterator.

Returns:
  If iter1 doesn't point to the begin of the list pointed to by iter2.

Definition at line 258 of file multimap.hpp.

template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >

bool operator!= | ( | const Tmap_iter2 & | iter2,
|  | const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > & | iter1 |
| ) |  |  |

Same as operator!=() with reversed order of arguments.

Parameters:

  | iter2 | Map iterator.
  | iter1 | MultiMap iterator.

Returns:
  If iter1 doesn't point to the begin of the list pointed to by iter2.

Definition at line 282 of file multimap.hpp.

template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tlist_iter2 , class Tkey , class Tvalue1 , class Tvalue2 , class Tcompare >

bool operator== | ( | const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue1, Tcompare > & | iter1,
|  | const MultiMapIterator< Tmap_iter2, Tlist_iter2, Tkey, Tvalue2, Tcompare > & | iter2 |
| ) |  |  |

Compare two MultiMap iterators.

Iterators are equal if 1. Their map iterators are equal. 2. They agree about list_valid. 3. If list_valid they agree about list_iter. Lots of template parameters to make all possible const and non-const types of MultiMap iterators (on maps with const and non-const values) comparable to each other.

Parameters:

  | iter1 | First iterator to compare.
  | iter2 | Second iterator to compare.

Returns:
  If iter1 and iter2 are equal.

Definition at line 209 of file multimap.hpp.

template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >

bool operator== | ( | const Tmap_iter2 & | iter2,
|  | const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > & | iter1 |
| ) |  |  |

Same as operator==() with reversed order of arguments.

Parameters:

  | iter2 | Map iterator.
  | iter1 | MultiMap iterator.

Returns:
  If iter1 points to the begin of the list pointed to by iter2.

Definition at line 270 of file multimap.hpp.

template<class Tmap_iter1 , class Tlist_iter1 , class Tmap_iter2 , class Tkey , class Tvalue , class Tcompare >

bool operator== | ( | const MultiMapIterator< Tmap_iter1, Tlist_iter1, Tkey, Tvalue, Tcompare > & | iter1,
|  | const Tmap_iter2 & | iter2 |
| ) |  |  |

Check if a MultiMap iterator is at the begin of a list pointed to by the given map iterator.

Lots of template parameters to make all possible const and non-const types of MultiMap iterators (on maps with const and non-const values) comparable to all possible types of map iterators.

Parameters:

  | iter1 | MultiMap iterator.
  | iter2 | Map iterator.

Returns:
  If iter1 points to the begin of the list pointed to by iter2.

Definition at line 246 of file multimap.hpp.