Libosmium 2.22.0 Fast and flexible C++ library for working with OpenStreetMap data

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Types | List of all members
osmium::index::multimap::Multimap< TId, TValue > Class Template Referenceabstract

`#include <multimap.hpp>`

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

## Public Types
using | key_type = TId
| The "key" type, usually osmium::unsigned_object_id_type.
using | value_type = TValue
| The "value" type, usually a Location or size_t.
using | iterator = element_type*

## Public Member Functions
| Multimap ()=default
| Multimap (const Multimap &)=delete
Multimap & | operator= (const Multimap &)=delete
virtual | ~Multimap () noexcept=default
virtual void | set (const TId id, const TValue value)=0
| Set the field with id to value.
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 &&) noexcept=default
Multimap & | operator= (Multimap &&) noexcept=default

## Private Types
using | element_type = typename std::pair<TId, TValue>

## Member Typedef Documentation

## ◆ element_type

template<typename TId , typename TValue >

using osmium::index::multimap::Multimap< TId, TValue >::element_type = typename std::pair<TId, TValue>
| private

## ◆ iterator

template<typename TId , typename TValue >

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

## ◆ key_type

template<typename TId , typename TValue >

using osmium::index::multimap::Multimap< TId, TValue >::key_type = TId

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

## ◆ value_type

template<typename TId , typename TValue >

using osmium::index::multimap::Multimap< TId, TValue >::value_type = TValue

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

## Constructor & Destructor Documentation

## ◆ Multimap() [1/3]

template<typename TId , typename TValue >

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

## ◆ Multimap() [2/3]

template<typename TId , typename TValue >

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

## ◆ Multimap() [3/3]

template<typename TId , typename TValue >

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

## ◆ ~Multimap()

template<typename TId , typename TValue >

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

## Member Function Documentation

## ◆ clear()

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 >.

## ◆ dump_as_list()

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 >.

## ◆ operator=() [1/2]

template<typename TId , typename TValue >

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

## ◆ operator=() [2/2]

template<typename TId , typename TValue >

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

## ◆ set()

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 >.

## ◆ size()

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 >.

## ◆ sort()

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 >.

## ◆ used_memory()

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:

- include/osmium/index/multimap.hpp