Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <hybrid.hpp>
Public Types | |
using | iterator = HybridIterator< TId, TValue > |
using | const_iterator = const HybridIterator< TId, TValue > |
Public Types inherited from osmium::index::multimap::Multimap< TId, TValue > | |
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 | |
Hybrid () | |
~Hybrid () noexcept=default | |
size_t | size () const final |
size_t | used_memory () const final |
void | reserve (const size_t size) |
void | unsorted_set (const TId id, const TValue value) |
void | set (const TId id, const TValue value) final |
Set the field with id to value. More... | |
std::pair< iterator, iterator > | get_all (const TId id) |
void | remove (const TId id, const TValue value) |
void | consolidate () |
void | dump_as_list (const int fd) final |
void | clear () final |
void | sort () final |
Public Member Functions inherited from osmium::index::multimap::Multimap< TId, TValue > | |
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) |
Private Types | |
using | main_map_type = SparseMemArray< TId, TValue > |
using | extra_map_type = SparseMemMultimap< TId, TValue > |
Private Attributes | |
main_map_type | m_main |
extra_map_type | m_extra |
Additional Inherited Members | |
Protected Member Functions inherited from osmium::index::multimap::Multimap< TId, TValue > | |
Multimap (Multimap &&) noexcept=default | |
Multimap & | operator= (Multimap &&) noexcept=default |
using osmium::index::multimap::Hybrid< TId, TValue >::const_iterator = const HybridIterator<TId, TValue> |
|
private |
using osmium::index::multimap::Hybrid< TId, TValue >::iterator = HybridIterator<TId, TValue> |
|
private |
|
inline |
|
defaultnoexcept |
|
inlinefinalvirtual |
Clear memory used for this storage. After this you can not use the storage container any more.
Implements osmium::index::multimap::Multimap< TId, TValue >.
|
inline |
|
inlinefinalvirtual |
Reimplemented from osmium::index::multimap::Multimap< TId, TValue >.
|
inline |
|
inline |
|
inline |
|
inlinefinalvirtual |
Set the field with id to value.
Implements osmium::index::multimap::Multimap< TId, TValue >.
|
inlinefinalvirtual |
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.
Implements osmium::index::multimap::Multimap< TId, TValue >.
|
inlinefinalvirtual |
Sort data in map. Call this after writing all data and before reading. Not all implementations need this.
Reimplemented from osmium::index::multimap::Multimap< TId, TValue >.
|
inline |
|
inlinefinalvirtual |
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.
Implements osmium::index::multimap::Multimap< TId, TValue >.
|
private |
|
private |