1#ifndef OSMIUM_MEMORY_COLLECTION_HPP
2#define OSMIUM_MEMORY_COLLECTION_HPP
46 template <
typename TMember>
52 using data_type =
typename std::conditional<std::is_const<TMember>::value,
const unsigned char*,
unsigned char*>
::type;
84 return m_data == rhs.m_data;
88 return !(*
this == rhs);
91 unsigned char*
data() const noexcept {
96 return *
reinterpret_cast<TMember*
>(
m_data);
100 return reinterpret_cast<TMember*
>(
m_data);
103 template <
typename TChar,
typename TTraits>
104 void print(std::basic_ostream<TChar, TTraits>& out)
const {
105 out << static_cast<const void*>(
m_data);
110 template <
typename TChar,
typename TTraits,
typename TMember>
111 inline std::basic_ostream<TChar, TTraits>&
operator<<(std::basic_ostream<TChar, TTraits>& out,
const CollectionIterator<TMember>& iter) {
116 template <
typename TFilter,
typename TMember>
161 return m_it == rhs.m_it &&
m_end == rhs.m_end;
165 return !(*
this == rhs);
180 template <
typename TMember, osmium::item_type TCollectionItemType>
199 Item(sizeof(
Collection<TMember, TCollectionItemType>), TCollectionItemType) {
Definition: collection.hpp:117
std::forward_iterator_tag iterator_category
Definition: collection.hpp:134
bool operator==(const CollectionFilterIterator &rhs) const noexcept
Definition: collection.hpp:160
pointer operator->() const noexcept
Definition: collection.hpp:173
const TMember value_type
Definition: collection.hpp:135
CollectionFilterIterator(TFilter filter, CollectionIterator< TMember > begin, CollectionIterator< TMember > end)
Definition: collection.hpp:140
CollectionIterator< TMember > m_it
Definition: collection.hpp:120
bool operator!=(const CollectionFilterIterator &rhs) const noexcept
Definition: collection.hpp:164
value_type * pointer
Definition: collection.hpp:137
CollectionFilterIterator operator++(int) const
Definition: collection.hpp:154
reference operator*() const noexcept
Definition: collection.hpp:168
TFilter m_filter
Definition: collection.hpp:119
value_type & reference
Definition: collection.hpp:138
CollectionIterator< TMember > m_end
Definition: collection.hpp:121
CollectionFilterIterator & operator++()
Definition: collection.hpp:147
std::ptrdiff_t difference_type
Definition: collection.hpp:136
void advance()
Definition: collection.hpp:123
Definition: collection.hpp:47
bool operator==(const CollectionIterator< TMember > &rhs) const noexcept
Definition: collection.hpp:83
CollectionIterator(data_type data) noexcept
Definition: collection.hpp:68
typename std::conditional< std::is_const< TMember >::value, const unsigned char *, unsigned char * >::type data_type
Definition: collection.hpp:52
value_type & reference
Definition: collection.hpp:62
TMember & operator*() const noexcept
Definition: collection.hpp:95
unsigned char * data() const noexcept
Definition: collection.hpp:91
std::forward_iterator_tag iterator_category
Definition: collection.hpp:58
data_type m_data
Definition: collection.hpp:54
value_type * pointer
Definition: collection.hpp:61
CollectionIterator< TMember > & operator++()
Definition: collection.hpp:72
void print(std::basic_ostream< TChar, TTraits > &out) const
Definition: collection.hpp:104
CollectionIterator() noexcept
Definition: collection.hpp:64
TMember * operator->() const noexcept
Definition: collection.hpp:99
TMember value_type
Definition: collection.hpp:59
bool operator!=(const CollectionIterator< TMember > &rhs) const noexcept
Definition: collection.hpp:87
CollectionIterator< TMember > operator++(int)
Definition: collection.hpp:77
std::ptrdiff_t difference_type
Definition: collection.hpp:60
Definition: collection.hpp:181
bool empty() const noexcept
Definition: collection.hpp:207
TMember & reference
Definition: collection.hpp:186
std::size_t size_type
Definition: collection.hpp:190
const_iterator end() const noexcept
Definition: collection.hpp:240
static constexpr bool is_compatible_to(const osmium::item_type t) noexcept
Definition: collection.hpp:194
static constexpr osmium::item_type itemtype
Definition: collection.hpp:192
TMember value_type
Definition: collection.hpp:185
const_iterator begin() const noexcept
Definition: collection.hpp:236
iterator end() noexcept
Definition: collection.hpp:224
size_type size() const noexcept
Definition: collection.hpp:216
const_iterator cend() const noexcept
Definition: collection.hpp:232
const_iterator cbegin() const noexcept
Definition: collection.hpp:228
iterator begin() noexcept
Definition: collection.hpp:220
Collection() noexcept
Definition: collection.hpp:198
const TMember & const_reference
Definition: collection.hpp:187
item_size_type byte_size() const noexcept
Definition: item.hpp:163
double distance(const osmium::geom::Coordinates &c1, const osmium::geom::Coordinates &c2) noexcept
Definition: haversine.hpp:66
InputIterator< Reader > end(Reader &)
Definition: reader_iterator.hpp:47
InputIterator< Reader > begin(Reader &reader)
Definition: reader_iterator.hpp:43
std::basic_ostream< TChar, TTraits > & operator<<(std::basic_ostream< TChar, TTraits > &out, const CollectionIterator< TMember > &iter)
Definition: collection.hpp:111
type
Definition: entity_bits.hpp:63
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
item_type
Definition: item_type.hpp:45
Definition: location.hpp:555