1 #ifndef OSMIUM_OSM_CHANGESET_HPP
2 #define OSMIUM_OSM_CHANGESET_HPP
51 template <
class T>
class ObjectBuilder;
141 m_uid = uid < 0 ? 0 : static_cast<user_id_type>(
uid);
243 return reinterpret_cast<const char*
>(data() +
sizeof(
Changeset));
248 return osmium::detail::subitem_of_type<const TagList>(
cbegin(),
cend());
259 if (!strcmp(attr,
"id")) {
261 }
else if (!strcmp(attr,
"num_changes")) {
263 }
else if (!strcmp(attr,
"created_at")) {
265 }
else if (!strcmp(attr,
"closed_at")) {
267 }
else if (!strcmp(attr,
"uid")) {
295 const_iterator
end()
const {
306 return lhs.
id() == rhs.
id();
310 return ! (lhs == rhs);
317 return lhs.
id() < rhs.
id();
325 return ! (rhs < lhs);
329 return ! (lhs < rhs);
334 #endif // OSMIUM_OSM_CHANGESET_HPP
osmium::Timestamp m_closed_at
Definition: changeset.hpp:66
Changeset & set_closed_at(const osmium::Timestamp timestamp)
Definition: changeset.hpp:202
Definition: collection.hpp:47
num_changes_type m_num_changes
Definition: changeset.hpp:69
bool operator<=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:324
osmium::Box & bounds() noexcept
Definition: changeset.hpp:228
bool open() const noexcept
Is this changeset open?
Definition: changeset.hpp:176
string_size_type m_user_size
Definition: changeset.hpp:71
void set_attribute(const char *attr, const char *value)
Definition: changeset.hpp:258
user_id_type uid() const noexcept
Get user id.
Definition: changeset.hpp:118
item_type
Definition: item_type.hpp:43
Changeset & set_uid_from_signed(signed_user_id_type uid) noexcept
Definition: changeset.hpp:140
const TagList & tags() const
Get the list of tags.
Definition: changeset.hpp:247
const char * user() const
Get user name.
Definition: changeset.hpp:242
changeset_id_type id() const noexcept
Get ID of this changeset.
Definition: changeset.hpp:92
item_size_type padded_size() const
Definition: item.hpp:151
OSMEntity is the abstract base class for the OSMObject and Changeset classes.
Definition: entity.hpp:64
const_iterator begin() const
Definition: changeset.hpp:291
T padded_length(T length) noexcept
Definition: item.hpp:56
OSMIUM_CONSTEXPR bool operator==(const Box &lhs, const Box &rhs) noexcept
Definition: box.hpp:219
iterator begin()
Definition: changeset.hpp:275
Changeset & set_id(changeset_id_type id) noexcept
Definition: changeset.hpp:102
osmium::Timestamp closed_at() const noexcept
Definition: changeset.hpp:171
bool operator<(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:316
user_id_type m_uid
Definition: changeset.hpp:70
Namespace for everything in the Osmium library.
Definition: assembler.hpp:55
Changeset & set_uid(const char *uid)
Definition: changeset.hpp:151
Changeset & set_num_changes(num_changes_type num_changes) noexcept
Set the number of changes in this changeset.
Definition: changeset.hpp:213
void set_user_size(string_size_type size)
Definition: changeset.hpp:77
num_changes_type num_changes() const noexcept
Get the number of changes in this changeset.
Definition: changeset.hpp:208
const_iterator cend() const
Definition: changeset.hpp:287
Definition: timestamp.hpp:52
uint16_t string_size_type
Definition: types.hpp:58
const_iterator end() const
Definition: changeset.hpp:295
changeset_id_type m_id
Definition: changeset.hpp:68
osmium::Timestamp m_created_at
Definition: changeset.hpp:65
changeset_id_type string_to_changeset_id(const char *input)
Definition: types_from_string.hpp:96
bool user_is_anonymous() const noexcept
Is this user anonymous?
Definition: changeset.hpp:156
osmium::memory::CollectionIterator< Item > iterator
Definition: changeset.hpp:272
osmium::Box m_bounds
Definition: changeset.hpp:67
osmium::Timestamp created_at() const noexcept
Get timestamp when this changeset was created.
Definition: changeset.hpp:161
int32_t signed_user_id_type
Type for signed OSM user IDs.
Definition: types.hpp:50
Changeset()
Definition: changeset.hpp:73
Changeset & set_num_changes(const char *num_changes) noexcept
Set the number of changes in this changeset.
Definition: changeset.hpp:219
iterator end()
Definition: changeset.hpp:279
bool operator>=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:328
signed_user_id_type string_to_user_id(const char *input)
Definition: types_from_string.hpp:101
osmium::memory::CollectionIterator< const Item > const_iterator
Definition: changeset.hpp:273
Definition: builder.hpp:186
bool operator>(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:320
Changeset & set_created_at(const osmium::Timestamp timestamp)
Definition: changeset.hpp:191
unsigned char * subitems_position()
Definition: changeset.hpp:81
const unsigned char * subitems_position() const
Definition: changeset.hpp:85
An OSM Changeset, a group of changes made by a single user over a short period of time...
Definition: changeset.hpp:61
const osmium::Box & bounds() const noexcept
Definition: changeset.hpp:237
uint32_t num_changes_type
Type for changeset num_changes.
Definition: types.hpp:51
bool closed() const noexcept
Is this changeset closed?
Definition: changeset.hpp:181
uint32_t changeset_id_type
Type for OSM changeset IDs.
Definition: types.hpp:48
const_iterator cbegin() const
Definition: changeset.hpp:283
bool operator!=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:309
Changeset & set_id(const char *id)
Definition: changeset.hpp:113
num_changes_type string_to_num_changes(const char *input)
Definition: types_from_string.hpp:109
Changeset & set_uid(user_id_type uid) noexcept
Definition: changeset.hpp:128
uint32_t user_id_type
Type for OSM user IDs.
Definition: types.hpp:49