1 #ifndef OSMIUM_OSM_RELATION_HPP 2 #define OSMIUM_OSM_RELATION_HPP 51 template <
typename TDerived,
typename T>
52 class OSMObjectBuilder;
54 class RelationMemberListBuilder;
70 const unsigned char*
endpos()
const {
74 template <
typename TMember>
79 return endpos() + reinterpret_cast<osmium::memory::Item*>(
endpos())->byte_size();
84 const unsigned char*
next()
const {
86 return endpos() + reinterpret_cast<const osmium::memory::Item*>(
endpos())->byte_size();
124 return static_cast<unsigned_object_id_type>(std::abs(
m_ref));
140 const char*
role() const noexcept {
145 return *reinterpret_cast<OSMObject*>(
endpos());
149 return *reinterpret_cast<const OSMObject*>(
endpos());
170 template <
typename TDerived,
typename T>
187 return osmium::detail::subitem_of_type<RelationMemberList>(
begin(),
end());
192 return osmium::detail::subitem_of_type<const RelationMemberList>(
cbegin(),
cend());
197 return osmium::detail::subitem_of_type<const RelationMemberList>(
cbegin(),
cend());
205 #endif // OSMIUM_OSM_RELATION_HPP string_size_type m_role_size
Definition: relation.hpp:64
Definition: osm_object_builder.hpp:402
#define OSMIUM_DEPRECATED
Definition: compatibility.hpp:50
Definition: collection.hpp:47
uint16_t m_flags
Definition: relation.hpp:63
RelationMemberList & members()
Get a reference to the member list.
Definition: relation.hpp:186
item_type
Definition: item_type.hpp:43
Definition: relation.hpp:168
uint16_t string_size_type
Definition: types.hpp:59
const RelationMemberList & cmembers() const
Get a const reference to the member list.
Definition: relation.hpp:196
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
OSMObject & get_object()
Definition: relation.hpp:144
const_iterator cbegin() const noexcept
Definition: collection.hpp:164
Definition: relation.hpp:154
Relation() noexcept
Definition: relation.hpp:173
static constexpr osmium::item_type itemtype
Definition: collection.hpp:128
constexpr std::size_t padded_length(std::size_t length) noexcept
Definition: item.hpp:64
Definition: relation.hpp:57
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
unsigned_object_id_type positive_ref() const noexcept
Definition: relation.hpp:123
static constexpr bool is_compatible_to(osmium::item_type t) noexcept
Definition: relation.hpp:181
const unsigned char * next() const
Definition: relation.hpp:84
Definition: collection.hpp:117
const_iterator cend() const noexcept
Definition: collection.hpp:168
unsigned char * endpos()
Definition: relation.hpp:66
int64_t object_id_type
Type for OSM object (node, way, or relation) IDs.
Definition: types.hpp:45
~RelationMember() noexcept=default
item_type m_type
Definition: relation.hpp:62
item_type type() const noexcept
Definition: relation.hpp:132
OSMIUM_DEPRECATED RelationMember & ref(object_id_type ref) noexcept
Definition: relation.hpp:118
RelationMember & operator=(const RelationMember &)=delete
RelationMemberList() noexcept=default
bool full_member() const noexcept
Definition: relation.hpp:136
const unsigned char * endpos() const
Definition: relation.hpp:70
unsigned char * data() const noexcept
Definition: collection.hpp:91
void set_role_size(string_size_type size) noexcept
Definition: relation.hpp:91
object_id_type ref() const noexcept
Definition: relation.hpp:113
const char * role() const noexcept
Definition: relation.hpp:140
RelationMember & set_ref(const osmium::object_id_type ref) noexcept
Definition: relation.hpp:127
iterator end() noexcept
Definition: collection.hpp:160
const RelationMemberList & members() const
Get a const reference to the member list.
Definition: relation.hpp:191
object_id_type m_ref
Definition: relation.hpp:61
static constexpr bool is_compatible_to(osmium::item_type t) noexcept
Definition: relation.hpp:158
RelationMember(const object_id_type ref=0, const item_type type=item_type(), const bool full=false) noexcept
Definition: relation.hpp:99
static constexpr item_type collection_type
Definition: relation.hpp:97
iterator begin() noexcept
Definition: collection.hpp:156
unsigned char * next()
Definition: relation.hpp:77
Definition: osm_object_builder.hpp:229
const OSMObject & get_object() const
Definition: relation.hpp:148
Definition: object.hpp:64