1 #ifndef OSMIUM_OSM_CHANGESET_HPP
2 #define OSMIUM_OSM_CHANGESET_HPP
51 class ChangesetDiscussionBuilder;
52 template <
typename T>
class ObjectBuilder;
76 const unsigned char*
endpos()
const {
80 template <
typename TMember>
87 unsigned const char*
next()
const {
118 const char*
user() const noexcept {
122 const char*
text() const noexcept {
237 m_uid = uid < 0 ? 0 : static_cast<user_id_type>(
uid);
355 return reinterpret_cast<const char*
>(data() +
sizeof(
Changeset));
360 return osmium::detail::subitem_of_type<const TagList>(
cbegin(),
cend());
371 if (!strcmp(attr,
"id")) {
373 }
else if (!strcmp(attr,
"num_changes")) {
375 }
else if (!strcmp(attr,
"comments_count")) {
377 }
else if (!strcmp(attr,
"created_at")) {
379 }
else if (!strcmp(attr,
"closed_at")) {
381 }
else if (!strcmp(attr,
"uid")) {
409 const_iterator
end()
const {
414 return osmium::detail::subitem_of_type<ChangesetDiscussion>(
begin(),
end());
418 return osmium::detail::subitem_of_type<const ChangesetDiscussion>(
cbegin(),
cend());
428 return lhs.
id() == rhs.
id();
432 return ! (lhs == rhs);
439 return lhs.
id() < rhs.
id();
447 return ! (rhs < lhs);
451 return ! (lhs < rhs);
456 #endif // OSMIUM_OSM_CHANGESET_HPP
osmium::Timestamp m_closed_at
Definition: changeset.hpp:160
size_type size() const noexcept
Definition: changeset.hpp:140
Definition: changeset.hpp:128
iterator end()
Definition: collection.hpp:127
Definition: collection.hpp:47
num_changes_type m_num_changes
Definition: changeset.hpp:162
bool operator<=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:446
osmium::Box & bounds() noexcept
Definition: changeset.hpp:340
unsigned char * data() const noexcept
Definition: collection.hpp:85
osmium::Timestamp created_at() const noexcept
Get timestamp when this changeset was created.
Definition: changeset.hpp:257
bool closed() const noexcept
Is this changeset closed?
Definition: changeset.hpp:277
string_size_type m_user_size
Definition: changeset.hpp:165
user_id_type uid() const noexcept
Get user id.
Definition: changeset.hpp:214
constexpr bool operator==(const Box &lhs, const Box &rhs) noexcept
Definition: box.hpp:219
void set_attribute(const char *attr, const char *value)
Definition: changeset.hpp:370
bool open() const noexcept
Is this changeset open?
Definition: changeset.hpp:272
item_type
Definition: item_type.hpp:43
Changeset & set_uid_from_signed(signed_user_id_type uid) noexcept
Definition: changeset.hpp:236
const TagList & tags() const
Get the list of tags.
Definition: changeset.hpp:359
const char * user() const
Get user name.
Definition: changeset.hpp:354
item_size_type padded_size() const
Definition: item.hpp:151
num_comments_type num_comments() const noexcept
Get the number of comments in this changeset.
Definition: changeset.hpp:320
OSMEntity is the abstract base class for the OSMObject and Changeset classes.
Definition: entity.hpp:64
iterator begin()
Definition: collection.hpp:123
Changeset & set_num_changes(const char *num_changes)
Set the number of changes in this changeset.
Definition: changeset.hpp:315
num_comments_type m_num_comments
Definition: changeset.hpp:163
double distance(const osmium::geom::Coordinates &c1, const osmium::geom::Coordinates &c2)
Definition: haversine.hpp:64
const_iterator begin() const
Definition: changeset.hpp:405
T padded_length(T length) noexcept
Definition: item.hpp:56
Definition: osm_object_builder.hpp:268
iterator begin()
Definition: changeset.hpp:389
Changeset & set_id(changeset_id_type id) noexcept
Definition: changeset.hpp:198
int32_t m_padding2
Definition: changeset.hpp:167
bool operator<(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:438
user_id_type m_uid
Definition: changeset.hpp:164
Namespace for everything in the Osmium library.
Definition: assembler.hpp:59
Changeset & set_uid(const char *uid)
Definition: changeset.hpp:247
Changeset & set_num_changes(num_changes_type num_changes) noexcept
Set the number of changes in this changeset.
Definition: changeset.hpp:309
changeset_id_type id() const noexcept
Get ID of this changeset.
Definition: changeset.hpp:188
void set_user_size(string_size_type size)
Definition: changeset.hpp:173
Definition: collection.hpp:105
const_iterator cend() const
Definition: changeset.hpp:401
Definition: timestamp.hpp:55
uint16_t string_size_type
Definition: types.hpp:59
const_iterator end() const
Definition: changeset.hpp:409
changeset_id_type m_id
Definition: changeset.hpp:161
osmium::Timestamp m_created_at
Definition: changeset.hpp:159
changeset_id_type string_to_changeset_id(const char *input)
Definition: types_from_string.hpp:137
Changeset & set_num_comments(num_comments_type num_comments) noexcept
Set the number of comments in this changeset.
Definition: changeset.hpp:325
osmium::memory::CollectionIterator< Item > iterator
Definition: changeset.hpp:386
osmium::Box m_bounds
Definition: changeset.hpp:158
int32_t signed_user_id_type
Type for signed OSM user IDs.
Definition: types.hpp:50
Changeset()
Definition: changeset.hpp:169
iterator end()
Definition: changeset.hpp:393
bool operator>=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:450
signed_user_id_type string_to_user_id(const char *input)
Definition: types_from_string.hpp:151
osmium::memory::CollectionIterator< const Item > const_iterator
Definition: changeset.hpp:387
Changeset & set_num_comments(const char *num_comments)
Set the number of comments in this changeset.
Definition: changeset.hpp:331
Definition: builder.hpp:186
bool operator>(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:442
unsigned char * subitems_position()
Definition: changeset.hpp:177
ChangesetDiscussion & discussion()
Definition: changeset.hpp:413
const unsigned char * subitems_position() const
Definition: changeset.hpp:181
Changeset & set_created_at(const osmium::Timestamp ×tamp)
Definition: changeset.hpp:287
An OSM Changeset, a group of changes made by a single user over a short period of time...
Definition: changeset.hpp:154
uint32_t num_changes_type
Type for changeset num_changes.
Definition: types.hpp:51
int16_t m_padding1
Definition: changeset.hpp:166
Changeset & set_closed_at(const osmium::Timestamp ×tamp)
Definition: changeset.hpp:298
bool user_is_anonymous() const noexcept
Is this user anonymous?
Definition: changeset.hpp:252
uint32_t changeset_id_type
Type for OSM changeset IDs.
Definition: types.hpp:48
size_t size_type
Definition: changeset.hpp:134
const_iterator cbegin() const
Definition: changeset.hpp:397
uint32_t num_comments_type
Type for changeset num_comments.
Definition: types.hpp:52
num_comments_type string_to_num_comments(const char *input)
Definition: types_from_string.hpp:182
const osmium::Box & bounds() const noexcept
Definition: changeset.hpp:349
bool operator!=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:431
Changeset & set_id(const char *id)
Definition: changeset.hpp:209
num_changes_type string_to_num_changes(const char *input)
Definition: types_from_string.hpp:168
Changeset & set_uid(user_id_type uid) noexcept
Definition: changeset.hpp:224
osmium::Timestamp closed_at() const noexcept
Definition: changeset.hpp:267
const ChangesetDiscussion & discussion() const
Definition: changeset.hpp:417
uint32_t user_id_type
Type for OSM user IDs.
Definition: types.hpp:49
num_changes_type num_changes() const noexcept
Get the number of changes in this changeset.
Definition: changeset.hpp:304