Libosmium
2.4.1
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <multimap.hpp>
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 |
|
private |
typedef element_type* osmium::index::multimap::Multimap< TId, TValue >::iterator |
typedef TId osmium::index::multimap::Multimap< TId, TValue >::key_type |
The "key" type, usually osmium::unsigned_object_id_type.
typedef TValue osmium::index::multimap::Multimap< TId, TValue >::value_type |
The "value" type, usually a Location or size_t.
|
privatedelete |
|
protecteddefault |
|
default |
|
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 |
|
privatedelete |
|
protecteddefault |
|
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 >.