Libosmium
2.15.5
Fast and flexible C++ library for working with OpenStreetMap data
|
Go to the documentation of this file. 1 #ifndef OSMIUM_OSM_CHANGESET_HPP
2 #define OSMIUM_OSM_CHANGESET_HPP
53 class ChangesetDiscussionBuilder;
54 class ChangesetBuilder;
72 const unsigned char*
endpos()
const {
76 template <
typename TMember>
83 const unsigned char*
next()
const {
122 const char*
user() const noexcept {
126 const char*
text() const noexcept {
246 m_uid = uid < 0 ? 0 : static_cast<user_id_type>(
uid);
365 return reinterpret_cast<const char*
>(data() +
sizeof(
Changeset));
375 return osmium::detail::subitem_of_type<const TagList>(
cbegin(),
cend());
386 if (!std::strcmp(attr,
"id")) {
388 }
else if (!std::strcmp(attr,
"num_changes")) {
390 }
else if (!std::strcmp(attr,
"comments_count")) {
392 }
else if (!std::strcmp(attr,
"created_at")) {
394 }
else if (!std::strcmp(attr,
"closed_at")) {
396 }
else if (!std::strcmp(attr,
"uid")) {
429 return osmium::detail::subitem_of_type<ChangesetDiscussion>(
begin(),
end());
433 return osmium::detail::subitem_of_type<const ChangesetDiscussion>(
cbegin(),
cend());
443 return lhs.
id() == rhs.
id();
447 return !(lhs == rhs);
454 return lhs.
id() < rhs.
id();
471 #endif // OSMIUM_OSM_CHANGESET_HPP
osmium::memory::CollectionIterator< Item > iterator
Definition: changeset.hpp:401
int32_t signed_user_id_type
Type for signed OSM user IDs.
Definition: types.hpp:50
const unsigned char * subitems_position() const
Definition: changeset.hpp:179
Changeset & set_closed_at(const osmium::Timestamp ×tamp)
Definition: changeset.hpp:308
const_iterator begin() const
Definition: changeset.hpp:420
unsigned char * subitems_position()
Definition: changeset.hpp:175
int32_t m_padding2
Definition: changeset.hpp:161
Definition: osm_object_builder.hpp:599
uint32_t num_changes_type
Type for changeset num_changes.
Definition: types.hpp:51
const_iterator cend() const
Definition: changeset.hpp:416
const TagList & tags() const
Get the list of tags.
Definition: changeset.hpp:374
const ChangesetDiscussion & discussion() const
Definition: changeset.hpp:432
uint32_t user_id_type
Type for OSM user IDs.
Definition: types.hpp:49
user_id_type uid() const noexcept
Get user id.
Definition: changeset.hpp:223
uint32_t changeset_id_type
Type for OSM changeset IDs.
Definition: types.hpp:48
constexpr static bool is_compatible_to(osmium::item_type t) noexcept
Definition: changeset.hpp:187
Changeset & set_uid(const char *uid)
Definition: changeset.hpp:256
Changeset & set_num_comments(const char *num_comments)
Set the number of comments in this changeset.
Definition: changeset.hpp:341
Changeset & set_id(changeset_id_type id) noexcept
Definition: changeset.hpp:207
changeset_id_type id() const noexcept
Get ID of this changeset.
Definition: changeset.hpp:197
num_comments_type m_num_comments
Definition: changeset.hpp:157
Changeset & set_num_changes(const char *num_changes)
Set the number of changes in this changeset.
Definition: changeset.hpp:325
num_changes_type string_to_num_changes(const char *input)
Definition: types_from_string.hpp:200
num_comments_type num_comments() const noexcept
Get the number of comments in this changeset.
Definition: changeset.hpp:330
Changeset & set_num_changes(num_changes_type num_changes) noexcept
Set the number of changes in this changeset.
Definition: changeset.hpp:319
user_id_type m_uid
Definition: changeset.hpp:158
iterator begin()
Definition: changeset.hpp:404
bool operator<=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:461
bool operator>=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:465
Changeset & set_num_comments(num_comments_type num_comments) noexcept
Set the number of comments in this changeset.
Definition: changeset.hpp:335
Definition: collection.hpp:47
bool operator>(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:457
Changeset & set_uid_from_signed(signed_user_id_type uid) noexcept
Definition: changeset.hpp:245
int32_t do_not_use() const noexcept
Definition: changeset.hpp:192
osmium::Box m_bounds
Definition: changeset.hpp:152
user_id_type string_to_uid(const char *input)
Definition: types_from_string.hpp:186
void set_user_size(string_size_type size) noexcept
Definition: changeset.hpp:167
osmium::Timestamp closed_at() const noexcept
Definition: changeset.hpp:277
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53
uint32_t changeset_comment_size_type
Definition: types.hpp:66
Changeset()
Definition: changeset.hpp:163
constexpr bool operator==(const Box &lhs, const Box &rhs) noexcept
Definition: box.hpp:212
num_changes_type num_changes() const noexcept
Get the number of changes in this changeset.
Definition: changeset.hpp:314
ChangesetDiscussion() noexcept=default
static constexpr osmium::item_type itemtype
Definition: changeset.hpp:185
changeset_id_type string_to_changeset_id(const char *input)
Definition: types_from_string.hpp:149
bool operator<(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:453
uint32_t size() const noexcept
Definition: builder.hpp:133
osmium::Box & bounds() noexcept
Definition: changeset.hpp:350
void set_attribute(const char *attr, const char *value)
Definition: changeset.hpp:385
Definition: timestamp.hpp:147
Changeset & set_created_at(const osmium::Timestamp ×tamp)
Definition: changeset.hpp:297
iterator end()
Definition: changeset.hpp:408
string_size_type user_size() const noexcept
Definition: changeset.hpp:171
int16_t m_padding1
Definition: changeset.hpp:160
const_iterator end() const
Definition: changeset.hpp:424
osmium::memory::CollectionIterator< const Item > const_iterator
Definition: changeset.hpp:402
changeset_id_type m_id
Definition: changeset.hpp:155
uint32_t num_comments_type
Type for changeset num_comments.
Definition: types.hpp:52
const_iterator cbegin() const
Definition: changeset.hpp:412
num_comments_type string_to_num_comments(const char *input)
Definition: types_from_string.hpp:214
ChangesetDiscussion & discussion()
Definition: changeset.hpp:428
Changeset & set_uid(user_id_type uid) noexcept
Definition: changeset.hpp:233
osmium::Timestamp m_closed_at
Definition: changeset.hpp:154
Definition: changeset.hpp:132
bool closed() const noexcept
Is this changeset closed?
Definition: changeset.hpp:287
const char * user() const
Get user name.
Definition: changeset.hpp:364
bool open() const noexcept
Is this changeset open?
Definition: changeset.hpp:282
void clear_user() noexcept
Clear user name.
Definition: changeset.hpp:369
constexpr std::size_t padded_length(std::size_t length) noexcept
Definition: item.hpp:64
const osmium::Box & bounds() const noexcept
Definition: changeset.hpp:359
Definition: osm_object_builder.hpp:326
item_size_type padded_size() const
Definition: item.hpp:167
bool user_is_anonymous() const noexcept
Is this user anonymous?
Definition: changeset.hpp:262
osmium::Timestamp created_at() const noexcept
Get timestamp when this changeset was created.
Definition: changeset.hpp:267
Definition: collection.hpp:117
unsigned char * data() const noexcept
Definition: collection.hpp:91
string_size_type m_user_size
Definition: changeset.hpp:159
uint16_t string_size_type
Definition: types.hpp:59
item_type
Definition: item_type.hpp:43
osmium::Timestamp m_created_at
Definition: changeset.hpp:153
OSMEntity is the abstract base class for the OSMObject and Changeset classes.
Definition: entity.hpp:64
An OSM Changeset, a group of changes made by a single user over a short period of time.
Definition: changeset.hpp:148
bool operator!=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:446
num_changes_type m_num_changes
Definition: changeset.hpp:156
Changeset & set_id(const char *id)
Definition: changeset.hpp:218