Libosmium  2.5.4
Fast and flexible C++ library for working with OpenStreetMap data
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

typedef Filter< TKey, TValue, TKeyComp, TValueComp > filter_type
 
typedef const osmium::Tagargument_type
 
typedef bool result_type
 
typedef boost::filter_iterator< filter_type, osmium::TagList::const_iteratoriterator
 

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

typedef TKey key_type
 
typedef std::conditional< std::is_void< TValue >::value, bool, TValue >::type value_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>>
typedef const osmium::Tag& osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::argument_type
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
typedef Filter<TKey, TValue, TKeyComp, TValueComp> osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::filter_type
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
typedef boost::filter_iterator<filter_type, osmium::TagList::const_iterator> osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::iterator
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
typedef TKey osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::key_type
private
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
typedef bool osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::result_type
template<typename TKey , typename TValue = void, typename TKeyComp = match_key<TKey>, typename TValueComp = match_value<TValue>>
typedef std::conditional<std::is_void<TValue>::value, bool, TValue>::type osmium::tags::Filter< TKey, TValue, TKeyComp, TValueComp >::value_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: