Libosmium  2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
Public Member Functions | Private Types | Private Attributes | List of all members
osmium::index::RelationsMapStash Class Reference

#include <relations_map.hpp>

Collaboration diagram for osmium::index::RelationsMapStash:
Collaboration graph
[legend]

Public Member Functions

 RelationsMapStash ()=default
 
 RelationsMapStash (const RelationsMapStash &)=delete
 
RelationsMapStashoperator= (const RelationsMapStash &)=delete
 
 RelationsMapStash (RelationsMapStash &&) noexcept(std::is_nothrow_move_constructible< map_type >::value)
 
RelationsMapStashoperator= (RelationsMapStash &&) noexcept(std::is_nothrow_move_assignable< map_type >::value)
 
 ~RelationsMapStash () noexcept=default
 
void add (const osmium::unsigned_object_id_type member_id, const osmium::unsigned_object_id_type relation_id)
 
void add_members (const osmium::Relation &relation)
 
bool empty () const noexcept
 
std::size_t size () const noexcept
 
RelationsMapIndex build_index ()
 
RelationsMapIndex build_member_to_parent_index ()
 
RelationsMapIndex build_parent_to_member_index ()
 
RelationsMapIndexes build_indexes ()
 

Private Types

using map_type = detail::flat_map< osmium::unsigned_object_id_type, uint32_t, osmium::unsigned_object_id_type, uint32_t >
 

Private Attributes

map_type m_map
 
bool m_valid = true
 

Detailed Description

The RelationsMapStash is used to build up the data needed to create an index of member relation ID to parent relation ID or the other way around. See the RelationsMapIndex class for more.

Member Typedef Documentation

◆ map_type

Constructor & Destructor Documentation

◆ RelationsMapStash() [1/3]

osmium::index::RelationsMapStash::RelationsMapStash ( )
default

◆ RelationsMapStash() [2/3]

osmium::index::RelationsMapStash::RelationsMapStash ( const RelationsMapStash )
delete

◆ RelationsMapStash() [3/3]

osmium::index::RelationsMapStash::RelationsMapStash ( RelationsMapStash &&  ) const
inlinedefaultnoexcept

◆ ~RelationsMapStash()

osmium::index::RelationsMapStash::~RelationsMapStash ( )
defaultnoexcept

Member Function Documentation

◆ add()

void osmium::index::RelationsMapStash::add ( const osmium::unsigned_object_id_type  member_id,
const osmium::unsigned_object_id_type  relation_id 
)
inline

Add mapping from member to parent relation in the stash.

◆ add_members()

void osmium::index::RelationsMapStash::add_members ( const osmium::Relation relation)
inline

Add mapping from all members to given parent relation in the stash.

◆ build_index()

RelationsMapIndex osmium::index::RelationsMapStash::build_index ( )
inline

Build an index for member to parent lookups from the contents of this stash and return it.

After you get the index you can not use the stash any more!

Deprecated:
Use build_member_to_parent_index() instead.

◆ build_indexes()

RelationsMapIndexes osmium::index::RelationsMapStash::build_indexes ( )
inline

Build indexes for member-to-parent and parent-to-member lookups from the contents of this stash and return them.

After you get the index you can not use the stash any more!

◆ build_member_to_parent_index()

RelationsMapIndex osmium::index::RelationsMapStash::build_member_to_parent_index ( )
inline

Build an index for member to parent lookups from the contents of this stash and return it.

After you get the index you can not use the stash any more!

◆ build_parent_to_member_index()

RelationsMapIndex osmium::index::RelationsMapStash::build_parent_to_member_index ( )
inline

Build an index for parent to member lookups from the contents of this stash and return it.

After you get the index you can not use the stash any more!

◆ empty()

bool osmium::index::RelationsMapStash::empty ( ) const
inlinenoexcept

Is this stash empty?

Complexity: Constant.

◆ operator=() [1/2]

RelationsMapStash & osmium::index::RelationsMapStash::operator= ( const RelationsMapStash )
delete

◆ operator=() [2/2]

RelationsMapStash & osmium::index::RelationsMapStash::operator= ( RelationsMapStash &&  )
inlinedefaultnoexcept

◆ size()

std::size_t osmium::index::RelationsMapStash::size ( ) const
inlinenoexcept

How many entries are in this stash?

Complexity: Constant.

Member Data Documentation

◆ m_map

map_type osmium::index::RelationsMapStash::m_map
private

◆ m_valid

bool osmium::index::RelationsMapStash::m_valid = true
private

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