Libosmium  2.2.0
Fast and flexible C++ library for working with OpenStreetMap data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2 Class Reference

#include <collector.hpp>

Inheritance diagram for osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2:
Inheritance graph
[legend]
Collaboration diagram for osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2:
Collaboration graph
[legend]

Public Member Functions

 HandlerPass2 (TCollector &collector) noexcept
 
void node (const osmium::Node &node)
 
void way (const osmium::Way &way)
 
void relation (const osmium::Relation &relation)
 
void flush ()
 
- Public Member Functions inherited from osmium::handler::Handler
void osm_object (const osmium::OSMObject &) const
 
void node (const osmium::Node &) const
 
void way (const osmium::Way &) const
 
void relation (const osmium::Relation &) const
 
void area (const osmium::Area &) const
 
void changeset (const osmium::Changeset &) const
 
void tag_list (const osmium::TagList &) const
 
void way_node_list (const osmium::WayNodeList &) const
 
void relation_member_list (const osmium::RelationMemberList &) const
 
void outer_ring (const osmium::OuterRing &) const
 
void inner_ring (const osmium::InnerRing &) const
 
void flush () const
 

Private Member Functions

bool find_and_add_object (const osmium::OSMObject &object)
 

Private Attributes

TCollector & m_collector
 
int m_want_types
 

Detailed Description

template<class TCollector, bool TNodes, bool TWays, bool TRelations>
class osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2

This is the handler class for the second pass of the Collector.

Constructor & Destructor Documentation

template<class TCollector, bool TNodes, bool TWays, bool TRelations>
osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::HandlerPass2 ( TCollector &  collector)
inlinenoexcept

Member Function Documentation

template<class TCollector, bool TNodes, bool TWays, bool TRelations>
bool osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::find_and_add_object ( const osmium::OSMObject object)
inlineprivate

Find this object in the member vectors and add it to all relations that need it.

Returns
true if the member was added to at least one relation and false otherwise
template<class TCollector, bool TNodes, bool TWays, bool TRelations>
void osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::flush ( )
inline
template<class TCollector, bool TNodes, bool TWays, bool TRelations>
void osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::node ( const osmium::Node node)
inline
template<class TCollector, bool TNodes, bool TWays, bool TRelations>
void osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::relation ( const osmium::Relation relation)
inline
template<class TCollector, bool TNodes, bool TWays, bool TRelations>
void osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::way ( const osmium::Way way)
inline

Member Data Documentation

template<class TCollector, bool TNodes, bool TWays, bool TRelations>
TCollector& osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::m_collector
private
template<class TCollector, bool TNodes, bool TWays, bool TRelations>
int osmium::relations::Collector< TCollector, TNodes, TWays, TRelations >::HandlerPass2::m_want_types
private

This variable is initialized with the number of different kinds of OSM objects we are interested in. If we only need way members (for instance for the multipolygon collector) it is intialized with 1 for instance. If node and way members are needed, it is initialized with 2.

In the after_* methods of this handler, it is decremented and once it reaches 0, we know we have all members available that we are ever going to get.


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