Libosmium  2.7.2
Fast and flexible C++ library for working with OpenStreetMap data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp > Class Template Reference

#include <filter.hpp>

Inheritance diagram for osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >:
Inheritance graph
[legend]

Classes

struct  Rule
 

Public Types

using filter_type = Filter< TKey, TValue, TKeyComp, TValueComp >
 
using argument_type = const osmium::Tag &
 
using result_type = bool
 
using iterator = boost::filter_iterator< filter_type, osmium::TagList::const_iterator >
 

Public Member Functions

 Filter (bool default_result=false)
 
template<typename V = TValue, typename std::enable_if<!std::is_void< V >::value, int >::type = 0>
Filteradd (bool result, const key_type &key, const value_type &value)
 
Filteradd (bool result, const key_type &key)
 
bool operator() (const osmium::Tag &tag) const
 
size_t count () const
 
bool empty () const
 

Private Types

using key_type = TKey
 
using value_type = typename std::conditional< std::is_void< TValue >::value, bool, TValue >::type
 

Private Attributes

std::vector< Rulem_rules
 
bool m_default_result
 

Member Typedef Documentation

template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
using osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::argument_type = const osmium::Tag&
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
using osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::filter_type = Filter<TKey, TValue, TKeyComp, TValueComp>
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
using osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::iterator = boost::filter_iterator<filter_type, osmium::TagList::const_iterator>
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
using osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::key_type = TKey
private
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
using osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::result_type = bool
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
using osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::value_type = typename std::conditional<std::is_void<TValue>::value, bool, TValue>::type
private

Constructor & Destructor Documentation

template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::Filter ( bool  default_result = false)
inlineexplicit

Member Function Documentation

template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
template<typename V = TValue, typename std::enable_if<!std::is_void< V >::value, int >::type = 0>
Filter& osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::add ( bool  result,
const key_type key,
const value_type value 
)
inline
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
Filter& osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::add ( bool  result,
const key_type key 
)
inline
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
size_t osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::count ( ) const
inline

Return the number of rules in this filter.

template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
bool osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::empty ( ) const
inline

Is this filter empty, ie are there no rules defined?

template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
bool osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::operator() ( const osmium::Tag tag) const
inline

Member Data Documentation

template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
bool osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::m_default_result
private
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
std::vector<Rule> osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::m_rules
private

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