1 #ifndef OSMIUM_OSM_CHANGESET_HPP
2 #define OSMIUM_OSM_CHANGESET_HPP
52 template <
class T>
class ObjectBuilder;
142 m_uid = uid < 0 ? 0 : static_cast<user_id_type>(
uid);
244 return reinterpret_cast<const char*
>(data() +
sizeof(
Changeset));
249 return osmium::detail::subitem_of_type<const TagList>(
cbegin(),
cend());
260 if (!strcmp(attr,
"id")) {
262 }
else if (!strcmp(attr,
"num_changes")) {
264 }
else if (!strcmp(attr,
"created_at")) {
266 }
else if (!strcmp(attr,
"closed_at")) {
268 }
else if (!strcmp(attr,
"uid")) {
296 const_iterator
end()
const {
307 return lhs.
id() == rhs.
id();
311 return ! (lhs == rhs);
318 return lhs.
id() < rhs.
id();
326 return ! (rhs < lhs);
330 return ! (lhs < rhs);
335 #endif // OSMIUM_OSM_CHANGESET_HPP
osmium::Timestamp m_closed_at
Definition: changeset.hpp:67
Changeset & set_closed_at(const osmium::Timestamp timestamp)
Definition: changeset.hpp:203
Definition: collection.hpp:48
num_changes_type m_num_changes
Definition: changeset.hpp:70
bool operator<=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:325
osmium::Box & bounds() noexcept
Definition: changeset.hpp:229
bool open() const noexcept
Is this changeset open?
Definition: changeset.hpp:177
string_size_type m_user_size
Definition: changeset.hpp:72
void set_attribute(const char *attr, const char *value)
Definition: changeset.hpp:259
user_id_type uid() const noexcept
Get user id.
Definition: changeset.hpp:119
item_type
Definition: item_type.hpp:43
Changeset & set_uid_from_signed(signed_user_id_type uid) noexcept
Definition: changeset.hpp:141
const TagList & tags() const
Get the list of tags.
Definition: changeset.hpp:248
const char * user() const
Get user name.
Definition: changeset.hpp:243
changeset_id_type id() const noexcept
Get ID of this changeset.
Definition: changeset.hpp:93
item_size_type padded_size() const
Definition: item.hpp:152
OSMEntity is the abstract base class for the OSMObject and Changeset classes.
Definition: entity.hpp:63
const_iterator begin() const
Definition: changeset.hpp:292
T padded_length(T length) noexcept
Definition: item.hpp:57
OSMIUM_CONSTEXPR bool operator==(const Box &lhs, const Box &rhs) noexcept
Definition: box.hpp:219
iterator begin()
Definition: changeset.hpp:276
Changeset & set_id(changeset_id_type id) noexcept
Definition: changeset.hpp:103
osmium::Timestamp closed_at() const noexcept
Definition: changeset.hpp:172
bool operator<(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:317
user_id_type m_uid
Definition: changeset.hpp:71
Namespace for everything in the Osmium library.
Definition: assembler.hpp:55
Changeset & set_uid(const char *uid)
Definition: changeset.hpp:152
Changeset & set_num_changes(num_changes_type num_changes) noexcept
Set the number of changes in this changeset.
Definition: changeset.hpp:214
void set_user_size(string_size_type size)
Definition: changeset.hpp:78
num_changes_type num_changes() const noexcept
Get the number of changes in this changeset.
Definition: changeset.hpp:209
const_iterator cend() const
Definition: changeset.hpp:288
Definition: timestamp.hpp:53
uint16_t string_size_type
Definition: types.hpp:58
const_iterator end() const
Definition: changeset.hpp:296
changeset_id_type m_id
Definition: changeset.hpp:69
osmium::Timestamp m_created_at
Definition: changeset.hpp:66
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:157
osmium::memory::CollectionIterator< Item > iterator
Definition: changeset.hpp:273
osmium::Box m_bounds
Definition: changeset.hpp:68
osmium::Timestamp created_at() const noexcept
Get timestamp when this changeset was created.
Definition: changeset.hpp:162
int32_t signed_user_id_type
Type for signed OSM user IDs.
Definition: types.hpp:50
Changeset()
Definition: changeset.hpp:74
Changeset & set_num_changes(const char *num_changes) noexcept
Set the number of changes in this changeset.
Definition: changeset.hpp:220
iterator end()
Definition: changeset.hpp:280
bool operator>=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:329
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:274
Definition: builder.hpp:172
bool operator>(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:321
Changeset & set_created_at(const osmium::Timestamp timestamp)
Definition: changeset.hpp:192
unsigned char * subitems_position()
Definition: changeset.hpp:82
const unsigned char * subitems_position() const
Definition: changeset.hpp:86
An OSM Changeset, a group of changes made by a single user over a short period of time...
Definition: changeset.hpp:62
const osmium::Box & bounds() const noexcept
Definition: changeset.hpp:238
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:182
uint32_t changeset_id_type
Type for OSM changeset IDs.
Definition: types.hpp:48
const_iterator cbegin() const
Definition: changeset.hpp:284
bool operator!=(const Changeset &lhs, const Changeset &rhs)
Definition: changeset.hpp:310
Changeset & set_id(const char *id)
Definition: changeset.hpp:114
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:129
uint32_t user_id_type
Type for OSM user IDs.
Definition: types.hpp:49