Libosmium  2.6.0
Fast and flexible C++ library for working with OpenStreetMap data
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
osmium::Changeset Class Reference

An OSM Changeset, a group of changes made by a single user over a short period of time. More...

#include <changeset.hpp>

Inheritance diagram for osmium::Changeset:
Inheritance graph
[legend]
Collaboration diagram for osmium::Changeset:
Collaboration graph
[legend]

Public Types

typedef
osmium::memory::CollectionIterator
< Item
iterator
 
typedef
osmium::memory::CollectionIterator
< const Item
const_iterator
 

Public Member Functions

changeset_id_type id () const noexcept
 Get ID of this changeset. More...
 
Changesetset_id (changeset_id_type id) noexcept
 
Changesetset_id (const char *id)
 
user_id_type uid () const noexcept
 Get user id. More...
 
Changesetset_uid (user_id_type uid) noexcept
 
Changesetset_uid_from_signed (signed_user_id_type uid) noexcept
 
Changesetset_uid (const char *uid)
 
bool user_is_anonymous () const noexcept
 Is this user anonymous? More...
 
osmium::Timestamp created_at () const noexcept
 Get timestamp when this changeset was created. More...
 
osmium::Timestamp closed_at () const noexcept
 
bool open () const noexcept
 Is this changeset open? More...
 
bool closed () const noexcept
 Is this changeset closed? More...
 
Changesetset_created_at (const osmium::Timestamp &timestamp)
 
Changesetset_closed_at (const osmium::Timestamp &timestamp)
 
num_changes_type num_changes () const noexcept
 Get the number of changes in this changeset. More...
 
Changesetset_num_changes (num_changes_type num_changes) noexcept
 Set the number of changes in this changeset. More...
 
Changesetset_num_changes (const char *num_changes)
 Set the number of changes in this changeset. More...
 
num_comments_type num_comments () const noexcept
 Get the number of comments in this changeset. More...
 
Changesetset_num_comments (num_comments_type num_comments) noexcept
 Set the number of comments in this changeset. More...
 
Changesetset_num_comments (const char *num_comments)
 Set the number of comments in this changeset. More...
 
osmium::Boxbounds () noexcept
 
const osmium::Boxbounds () const noexcept
 
const char * user () const
 Get user name. More...
 
const TagListtags () const
 Get the list of tags. More...
 
void set_attribute (const char *attr, const char *value)
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_iterator begin () const
 
const_iterator end () const
 
ChangesetDiscussiondiscussion ()
 
const ChangesetDiscussiondiscussion () const
 
- Public Member Functions inherited from osmium::OSMEntity
 OSMEntity (osmium::memory::item_size_type size, osmium::item_type type)
 
bool type_is_in (osmium::osm_entity_bits::type entity_bits) const
 
- Public Member Functions inherited from osmium::memory::Item
unsigned char * next () noexcept
 
const unsigned char * next () const noexcept
 
item_size_type byte_size () const noexcept
 
item_size_type padded_size () const
 
item_type type () const noexcept
 
bool removed () const noexcept
 
void set_removed (bool removed) noexcept
 

Private Member Functions

 Changeset ()
 
void set_user_size (string_size_type size)
 
unsigned char * subitems_position ()
 
const unsigned char * subitems_position () const
 

Private Attributes

osmium::Box m_bounds
 
osmium::Timestamp m_created_at
 
osmium::Timestamp m_closed_at
 
changeset_id_type m_id {0}
 
num_changes_type m_num_changes {0}
 
num_comments_type m_num_comments {0}
 
user_id_type m_uid {0}
 
string_size_type m_user_size
 
int16_t m_padding1 {0}
 
int32_t m_padding2 {0}
 

Friends

class osmium::builder::ObjectBuilder< osmium::Changeset >
 

Additional Inherited Members

- Protected Member Functions inherited from osmium::memory::Item
 Item (item_size_type size=0, item_type type=item_type()) noexcept
 
 Item (const Item &)=delete
 
 Item (Item &&)=delete
 
Itemoperator= (const Item &)=delete
 
Itemoperator= (Item &&)=delete
 
Itemset_type (const item_type item_type) noexcept
 

Detailed Description

An OSM Changeset, a group of changes made by a single user over a short period of time.

You can not create Changeset objects directly. Use the ChangesetBuilder class to create Changesets in a Buffer.

Member Typedef Documentation

Constructor & Destructor Documentation

osmium::Changeset::Changeset ( )
inlineprivate

Member Function Documentation

iterator osmium::Changeset::begin ( )
inline
const_iterator osmium::Changeset::begin ( ) const
inline
osmium::Box& osmium::Changeset::bounds ( )
inlinenoexcept

Get the bounding box of this changeset.

Returns
Bounding box. Can be empty.
const osmium::Box& osmium::Changeset::bounds ( ) const
inlinenoexcept

Get the bounding box of this changeset.

Returns
Bounding box. Can be empty.
const_iterator osmium::Changeset::cbegin ( ) const
inline
const_iterator osmium::Changeset::cend ( ) const
inline
bool osmium::Changeset::closed ( ) const
inlinenoexcept

Is this changeset closed?

osmium::Timestamp osmium::Changeset::closed_at ( ) const
inlinenoexcept

Get timestamp when this changeset was closed.

Returns
Timestamp. Will return the empty Timestamp when the changeset is not yet closed.
osmium::Timestamp osmium::Changeset::created_at ( ) const
inlinenoexcept

Get timestamp when this changeset was created.

ChangesetDiscussion& osmium::Changeset::discussion ( )
inline
const ChangesetDiscussion& osmium::Changeset::discussion ( ) const
inline
iterator osmium::Changeset::end ( )
inline
const_iterator osmium::Changeset::end ( ) const
inline
changeset_id_type osmium::Changeset::id ( ) const
inlinenoexcept

Get ID of this changeset.

num_changes_type osmium::Changeset::num_changes ( ) const
inlinenoexcept

Get the number of changes in this changeset.

num_comments_type osmium::Changeset::num_comments ( ) const
inlinenoexcept

Get the number of comments in this changeset.

bool osmium::Changeset::open ( ) const
inlinenoexcept

Is this changeset open?

void osmium::Changeset::set_attribute ( const char *  attr,
const char *  value 
)
inline

Set named attribute.

Parameters
attrName of the attribute (must be one of "id", "version", "changeset", "timestamp", "uid", "visible")
valueValue of the attribute
Changeset& osmium::Changeset::set_closed_at ( const osmium::Timestamp timestamp)
inline

Set the timestamp when this changeset was closed.

Parameters
timestampTimestamp
Returns
Reference to changeset to make calls chainable.
Changeset& osmium::Changeset::set_created_at ( const osmium::Timestamp timestamp)
inline

Set the timestamp when this changeset was created.

Parameters
timestampTimestamp
Returns
Reference to changeset to make calls chainable.
Changeset& osmium::Changeset::set_id ( changeset_id_type  id)
inlinenoexcept

Set ID of this changeset

Parameters
idThe id.
Returns
Reference to changeset to make calls chainable.
Changeset& osmium::Changeset::set_id ( const char *  id)
inline

Set ID of this changeset.

Parameters
idThe id.
Returns
Reference to object to make calls chainable.
Changeset& osmium::Changeset::set_num_changes ( num_changes_type  num_changes)
inlinenoexcept

Set the number of changes in this changeset.

Changeset& osmium::Changeset::set_num_changes ( const char *  num_changes)
inline

Set the number of changes in this changeset.

Changeset& osmium::Changeset::set_num_comments ( num_comments_type  num_comments)
inlinenoexcept

Set the number of comments in this changeset.

Changeset& osmium::Changeset::set_num_comments ( const char *  num_comments)
inline

Set the number of comments in this changeset.

Changeset& osmium::Changeset::set_uid ( user_id_type  uid)
inlinenoexcept

Set user id.

Parameters
uidThe user id.
Returns
Reference to changeset to make calls chainable.
Changeset& osmium::Changeset::set_uid ( const char *  uid)
inline

Set user id to given uid or to 0 (anonymous user) if the given uid is smaller than 0.

Returns
Reference to changeset to make calls chainable.
Changeset& osmium::Changeset::set_uid_from_signed ( signed_user_id_type  uid)
inlinenoexcept

Set user id to given uid or to 0 (anonymous user) if the given uid is smaller than 0.

Parameters
uidThe user id.
Returns
Reference to changeset to make calls chainable.
void osmium::Changeset::set_user_size ( string_size_type  size)
inlineprivate
unsigned char* osmium::Changeset::subitems_position ( )
inlineprivate
const unsigned char* osmium::Changeset::subitems_position ( ) const
inlineprivate
const TagList& osmium::Changeset::tags ( ) const
inline

Get the list of tags.

user_id_type osmium::Changeset::uid ( ) const
inlinenoexcept

Get user id.

const char* osmium::Changeset::user ( ) const
inline

Get user name.

bool osmium::Changeset::user_is_anonymous ( ) const
inlinenoexcept

Is this user anonymous?

Friends And Related Function Documentation

Member Data Documentation

osmium::Box osmium::Changeset::m_bounds
private
osmium::Timestamp osmium::Changeset::m_closed_at
private
osmium::Timestamp osmium::Changeset::m_created_at
private
changeset_id_type osmium::Changeset::m_id {0}
private
num_changes_type osmium::Changeset::m_num_changes {0}
private
num_comments_type osmium::Changeset::m_num_comments {0}
private
int16_t osmium::Changeset::m_padding1 {0}
private
int32_t osmium::Changeset::m_padding2 {0}
private
user_id_type osmium::Changeset::m_uid {0}
private
string_size_type osmium::Changeset::m_user_size
private

The documentation for this class was generated from the following file: