1 #ifndef OSMIUM_OSM_RELATION_HPP 2 #define OSMIUM_OSM_RELATION_HPP 50 template <
typename>
class ObjectBuilder;
51 class RelationMemberListBuilder;
73 const unsigned char*
endpos()
const {
77 template <
typename TMember>
87 unsigned const char*
next()
const {
105 m_flags(full ? 1 : 0) {
134 const char*
role() const noexcept {
139 return *
reinterpret_cast<OSMObject*
>(endpos());
143 return *
reinterpret_cast<const OSMObject*
>(endpos());
158 size_type
size() const noexcept {
170 OSMObject(sizeof(Relation), osmium::item_type::relation) {
178 return osmium::detail::subitem_of_type<RelationMemberList>(
begin(),
end());
182 return osmium::detail::subitem_of_type<const RelationMemberList>(cbegin(), cend());
190 #endif // OSMIUM_OSM_RELATION_HPP
Definition: collection.hpp:47
RelationMember & ref(object_id_type ref) noexcept
Definition: relation.hpp:112
type
Definition: entity_bits.hpp:60
uint64_t unsigned_object_id_type
Type for OSM object (node, way, or relation) IDs where we only allow positive IDs.
Definition: types.hpp:46
uint16_t m_flags
Definition: relation.hpp:60
RelationMemberList & members()
Definition: relation.hpp:177
const OSMObject & get_object() const
Definition: relation.hpp:142
RelationMemberList()
Definition: relation.hpp:154
item_type
Definition: item_type.hpp:43
Definition: relation.hpp:165
OSMObject & get_object()
Definition: relation.hpp:138
Definition: relation.hpp:148
double distance(const osmium::geom::Coordinates &c1, const osmium::geom::Coordinates &c2)
Definition: haversine.hpp:64
T padded_length(T length) noexcept
Definition: item.hpp:56
const RelationMemberList & members() const
Definition: relation.hpp:181
Definition: relation.hpp:54
int64_t object_id_type
Type for OSM object (node, way, or relation) IDs.
Definition: types.hpp:45
Namespace for everything in the Osmium library.
Definition: assembler.hpp:59
unsigned_object_id_type positive_ref() const noexcept
Definition: relation.hpp:117
Definition: collection.hpp:111
unsigned char * endpos()
Definition: relation.hpp:69
uint16_t string_size_type
Definition: types.hpp:59
osmium::io::InputIterator< osmium::io::Reader > end(osmium::io::Reader &)
Definition: reader_iterator.hpp:45
unsigned const char * next() const
Definition: relation.hpp:87
item_type m_type
Definition: relation.hpp:59
item_type type() const noexcept
Definition: relation.hpp:126
bool full_member() const noexcept
Definition: relation.hpp:130
unsigned char * data() const noexcept
Definition: collection.hpp:85
void set_role_size(string_size_type size) noexcept
Definition: relation.hpp:94
object_id_type ref() const noexcept
Definition: relation.hpp:108
const char * role() const noexcept
Definition: relation.hpp:134
Definition: builder.hpp:186
RelationMember & set_ref(const osmium::object_id_type ref) noexcept
Definition: relation.hpp:121
object_id_type m_ref
Definition: relation.hpp:58
size_t size_type
Definition: relation.hpp:152
RelationMember(const object_id_type ref=0, const item_type type=item_type(), const bool full=false) noexcept
Definition: relation.hpp:102
const unsigned char * endpos() const
Definition: relation.hpp:73
osmium::io::InputIterator< osmium::io::Reader > begin(osmium::io::Reader &reader)
Definition: reader_iterator.hpp:41
unsigned char * next()
Definition: relation.hpp:80
Builder & operator=(const Builder &)=delete
Definition: osm_object_builder.hpp:193
Definition: object.hpp:58
size_type size() const noexcept
Definition: relation.hpp:158