Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <multimap.hpp>
Public Types | |
using | key_type = TId |
The "key" type, usually osmium::unsigned_object_id_type. More... | |
using | value_type = TValue |
The "value" type, usually a Location or size_t. More... | |
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. 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 &&) noexcept=default | |
Multimap & | operator= (Multimap &&) noexcept=default |
Private Types | |
using | element_type = typename std::pair< TId, TValue > |
|
private |
using osmium::index::multimap::Multimap< TId, TValue >::iterator = element_type* |
using osmium::index::multimap::Multimap< TId, TValue >::key_type = TId |
The "key" type, usually osmium::unsigned_object_id_type.
using osmium::index::multimap::Multimap< TId, TValue >::value_type = TValue |
The "value" type, usually a Location or size_t.
|
protecteddefaultnoexcept |
|
default |
|
delete |
|
virtualdefaultnoexcept |
|
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 >.
|
inlinevirtual |
|
delete |
|
protecteddefaultnoexcept |
|
pure virtual |
Set the field with id to value.
Implemented in osmium::index::multimap::Hybrid< TId, TValue >, and osmium::index::multimap::SparseMemMultimap< TId, TValue >.
|
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 >.
|
inlinevirtual |
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 >.
|
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 >.