osmium::index::multimap::Multimap< TId, TValue > Class Template Referenceabstract

`#include <multimap.hpp>`

Inheritance diagram for osmium::index::multimap::Multimap< TId, TValue >:
[legend]

## Public Types

typedef TId | key_type
| The "key" type, usually osmium::unsigned_object_id_type. More...
typedef TValue | value_type
| The "value" type, usually a Location or size_t. More...
typedef element_type * | iterator

## Public Member Functions

| Multimap ()=default
virtual | ~Multimap () noexcept=default
virtual void | set (const TId id, const TValue value)=0
| Set the field with id to value. More...
virtual size_t | size () const =0
virtual size_t | used_memory () const =0
virtual void | clear ()=0
virtual void | sort ()
virtual void | dump_as_list (const int)

## Protected Member Functions

| Multimap (Multimap &&)=default
Multimap & | operator= (Multimap &&)=default

## Private Types

typedef std::pair< TId, TValue > | element_type

## Private Member Functions

| Multimap (const Multimap &)=delete
Multimap & | operator= (const Multimap &)=delete

## Member Typedef Documentation

template<typename TId , typename TValue >

typedef std::pair<TId, TValue> osmium::index::multimap::Multimap< TId, TValue >::element_type

private

template<typename TId , typename TValue >

typedef element_type* osmium::index::multimap::Multimap< TId, TValue >::iterator

template<typename TId , typename TValue >

typedef TId osmium::index::multimap::Multimap< TId, TValue >::key_type

The "key" type, usually osmium::unsigned_object_id_type.

template<typename TId , typename TValue >

typedef TValue osmium::index::multimap::Multimap< TId, TValue >::value_type

The "value" type, usually a Location or size_t.

## Constructor & Destructor Documentation

template<typename TId , typename TValue >

osmium::index::multimap::Multimap< TId, TValue >::Multimap | ( | const Multimap< TId, TValue > & |  | ) |

private delete

template<typename TId , typename TValue >

osmium::index::multimap::Multimap< TId, TValue >::Multimap | ( | Multimap< TId, TValue > && |  | ) |

protected default

template<typename TId , typename TValue >

osmium::index::multimap::Multimap< TId, TValue >::Multimap | ( |  | ) |

default

template<typename TId , typename TValue >

virtual osmium::index::multimap::Multimap< TId, TValue >::~Multimap | ( |  | ) |

virtual default noexcept

## Member Function Documentation

template<typename TId , typename TValue >

virtual void osmium::index::multimap::Multimap< TId, TValue >::clear | ( |  | ) |

pure virtual

Clear memory used for this storage. After this you can not use the storage container any more.

Implemented in osmium::index::multimap::Hybrid< TId, TValue >, and osmium::index::multimap::SparseMemMultimap< TId, TValue >.

template<typename TId , typename TValue >

virtual void osmium::index::multimap::Multimap< TId, TValue >::dump_as_list | ( | const int |  | ) |

inline virtual

Reimplemented in osmium::index::multimap::Hybrid< TId, TValue >, and osmium::index::multimap::SparseMemMultimap< TId, TValue >.

template<typename TId , typename TValue >

Multimap& osmium::index::multimap::Multimap< TId, TValue >::operator= | ( | const Multimap< TId, TValue > & |  | ) |

private delete

template<typename TId , typename TValue >

Multimap& osmium::index::multimap::Multimap< TId, TValue >::operator= | ( | Multimap< TId, TValue > && |  | ) |

protected default

template<typename TId , typename TValue >

virtual void osmium::index::multimap::Multimap< TId, TValue >::set | ( | const TId | id,
|  | const TValue | value
| ) |  |

pure virtual

Set the field with id to value.

Implemented in osmium::index::multimap::Hybrid< TId, TValue >, and osmium::index::multimap::SparseMemMultimap< TId, TValue >.

template<typename TId , typename TValue >

virtual size_t osmium::index::multimap::Multimap< TId, TValue >::size | ( |  | ) | const

pure virtual

Get the approximate number of items in the storage. The storage might allocate memory in blocks, so this size might not be accurate. You can not use this to find out how much memory the storage uses. Use used_memory() for that.

Implemented in osmium::index::multimap::Hybrid< TId, TValue >, and osmium::index::multimap::SparseMemMultimap< TId, TValue >.

template<typename TId , typename TValue >

virtual void osmium::index::multimap::Multimap< TId, TValue >::sort | ( |  | ) |

inline virtual

Sort data in map. Call this after writing all data and before reading. Not all implementations need this.

Reimplemented in osmium::index::multimap::Hybrid< TId, TValue >.

template<typename TId , typename TValue >

virtual size_t osmium::index::multimap::Multimap< TId, TValue >::used_memory | ( |  | ) | const

pure virtual

Get the memory used for this storage in bytes. Note that this is not necessarily entirely accurate but an approximation. For storage classes that store the data in memory, this is the main memory used, for storage classes storing data on disk this is the memory used on disk.

Implemented in osmium::index::multimap::Hybrid< TId, TValue >, and osmium::index::multimap::SparseMemMultimap< TId, TValue >.

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

- osmium/index/multimap.hpp