1 #ifndef OSMIUM_OSM_ENTITY_HPP 2 #define OSMIUM_OSM_ENTITY_HPP 44 template <
typename TSubitem,
typename TIter>
45 inline TSubitem& subitem_of_type(TIter it,
const TIter&
end) {
46 for (; it !=
end; ++it) {
47 if (TSubitem::is_compatible_to(it->type())) {
48 return reinterpret_cast<TSubitem&
>(*it);
54 static TSubitem subitem;
88 #endif // OSMIUM_OSM_ENTITY_HPP
type
Definition: entity_bits.hpp:63
uint32_t item_size_type
Definition: item.hpp:59
item_type
Definition: item_type.hpp:43
OSMEntity is the abstract base class for the OSMObject and Changeset classes.
Definition: entity.hpp:64
OSMEntity(osmium::memory::item_size_type size, osmium::item_type type)
Definition: entity.hpp:76
type from_item_type(osmium::item_type item_type) noexcept
Definition: entity_bits.hpp:108
Namespace for everything in the Osmium library.
Definition: assembler.hpp:63
osmium::io::InputIterator< osmium::io::Reader > end(osmium::io::Reader &)
Definition: reader_iterator.hpp:45
static constexpr bool is_compatible_to(osmium::item_type t) noexcept
Definition: entity.hpp:68
bool type_is_in(osmium::osm_entity_bits::type entity_bits) const
Definition: entity.hpp:80