1 #ifndef OSMIUM_TAGS_MATCHER_HPP 2 #define OSMIUM_TAGS_MATCHER_HPP 36 #include <type_traits> 70 template <
typename TKey,
typename std::enable_if<
71 std::is_convertible<TKey, osmium::StringMatcher>::value,
int>
::type = 0>
73 m_key_matcher(
std::forward<TKey>(key_matcher)),
86 template <
typename TKey,
typename TValue,
87 typename std::enable_if<std::is_convertible<TKey, osmium::StringMatcher>::value,
int>::type = 0,
88 typename std::enable_if<std::is_convertible<TValue, osmium::StringMatcher>::value,
int>::type = 0>
89 TagMatcher(TKey&& key_matcher, TValue&& value_matcher,
bool invert =
false) :
90 m_key_matcher(
std::forward<TKey>(key_matcher)),
91 m_value_matcher(
std::forward<TValue>(value_matcher)),
100 bool operator()(
const char* key,
const char* value)
const noexcept {
120 for (
const auto& tag : tags) {
121 if (
operator()(tag)) {
132 #endif // OSMIUM_TAGS_MATCHER_HPP TagMatcher()
Definition: matcher.hpp:58
type
Definition: entity_bits.hpp:63
bool operator()(const osmium::TagList &tags) const noexcept
Definition: matcher.hpp:119
Definition: reader_iterator.hpp:39
TagMatcher(TKey &&key_matcher, TValue &&value_matcher, bool invert=false)
Definition: matcher.hpp:89
Namespace for everything in the Osmium library.
Definition: assembler.hpp:63
bool operator()(const char *key, const char *value) const noexcept
Definition: matcher.hpp:100
Definition: string_matcher.hpp:73
Definition: matcher.hpp:47
bool operator()(const osmium::Tag &tag) const noexcept
Definition: matcher.hpp:110
bool m_result
Definition: matcher.hpp:51
Definition: string_matcher.hpp:84
TagMatcher(TKey &&key_matcher)
Definition: matcher.hpp:72
osmium::StringMatcher m_value_matcher
Definition: matcher.hpp:50
osmium::StringMatcher m_key_matcher
Definition: matcher.hpp:49