Loading...
Searching...
No Matches
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:
[legend]
Collaboration diagram for osmium::Changeset:
[legend]

## Public Types

using | iterator = osmium::memory::CollectionIterator< Item >
using | const_iterator = osmium::memory::CollectionIterator< const Item >

## Public Member Functions

int32_t | do_not_use () const noexcept
changeset_id_type | id () const noexcept
| Get ID of this changeset.
Changeset & | set_id (changeset_id_type id) noexcept
Changeset & | set_id (const char *id)
user_id_type | uid () const noexcept
| Get user id.
Changeset & | set_uid (user_id_type uid) noexcept
Changeset & | set_uid_from_signed (signed_user_id_type uid) noexcept
Changeset & | set_uid (const char *uid)
bool | user_is_anonymous () const noexcept
| Is this user anonymous?
osmium::Timestamp | created_at () const noexcept
| Get timestamp when this changeset was created.
osmium::Timestamp | closed_at () const noexcept
bool | open () const noexcept
| Is this changeset open?
bool | closed () const noexcept
| Is this changeset closed?
Changeset & | set_created_at (const osmium::Timestamp &timestamp)
Changeset & | set_closed_at (const osmium::Timestamp &timestamp)
num_changes_type | num_changes () const noexcept
| Get the number of changes in this changeset.
Changeset & | set_num_changes (num_changes_type num_changes) noexcept
| Set the number of changes in this changeset.
Changeset & | set_num_changes (const char *num_changes)
| Set the number of changes in this changeset.
num_comments_type | num_comments () const noexcept
| Get the number of comments in this changeset.
Changeset & | set_num_comments (num_comments_type num_comments) noexcept
| Set the number of comments in this changeset.
Changeset & | set_num_comments (const char *num_comments)
| Set the number of comments in this changeset.
osmium::Box & | bounds () noexcept
const osmium::Box & | bounds () const noexcept
const char * | user () const
| Get user name.
void | clear_user () noexcept
| Clear user name.
const TagList & | tags () const
| Get the list of tags.
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
ChangesetDiscussion & | discussion ()
const ChangesetDiscussion & | discussion () 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
| Item (const Item &)=delete
Item & | operator= (const Item &)=delete
| Item (Item &&)=delete
Item & | operator= (Item &&)=delete
| ~Item () noexcept=default
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 (const bool removed) noexcept
diff_indicator_type | diff () const noexcept
char | diff_as_char () const noexcept
void | set_diff (const diff_indicator_type diff) noexcept

## Static Public Member Functions

static constexpr bool | is_compatible_to (osmium::item_type t) noexcept
Static Public Member Functions inherited from osmium::OSMEntity
static constexpr bool | is_compatible_to (osmium::item_type t) noexcept
Static Public Member Functions inherited from osmium::memory::Item
static constexpr bool | is_compatible_to (osmium::item_type) noexcept

## Static Public Attributes

static constexpr osmium::item_type | itemtype = osmium::item_type::changeset

## Private Member Functions

| Changeset ()
void | set_user_size (string_size_type size) noexcept
string_size_type | user_size () const noexcept
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 = 0
int16_t | m_padding1 = 0
int32_t | m_padding2 = 0

## Friends

class | osmium::builder::ChangesetBuilder

## Additional Inherited Members

Protected Member Functions inherited from osmium::memory::Item
| Item (item_size_type size=0, item_type type=item_type{}) noexcept
Item & | set_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

## const_iterator

using osmium::Changeset::const_iterator = osmium::memory::CollectionIterator<const Item>

## iterator

using osmium::Changeset::iterator = osmium::memory::CollectionIterator<Item>

## Constructor & Destructor Documentation

## Changeset()

osmium::Changeset::Changeset | ( |  | ) |

inline private

## Member Function Documentation

## begin() [1/2]

iterator osmium::Changeset::begin | ( |  | ) |

inline

## begin() [2/2]

const_iterator osmium::Changeset::begin | ( |  | ) | const

inline

## bounds() [1/2]

const osmium::Box & osmium::Changeset::bounds | ( |  | ) | const

inline noexcept

Get the bounding box of this changeset.

Returns
  Bounding box. Can be empty.

## bounds() [2/2]

osmium::Box & osmium::Changeset::bounds | ( |  | ) |

inline noexcept

Get the bounding box of this changeset.

Returns
  Bounding box. Can be empty.

## cbegin()

const_iterator osmium::Changeset::cbegin | ( |  | ) | const

inline

## cend()

const_iterator osmium::Changeset::cend | ( |  | ) | const

inline

## clear_user()

void osmium::Changeset::clear_user | ( |  | ) |

inline noexcept

Clear user name.

## closed()

bool osmium::Changeset::closed | ( |  | ) | const

inline noexcept

Is this changeset closed?

## closed_at()

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

inline noexcept

Get timestamp when this changeset was closed.

Returns
  Timestamp. Will return the empty Timestamp when the changeset is not yet closed.

## created_at()

osmium::Timestamp osmium::Changeset::created_at | ( |  | ) | const

inline noexcept

Get timestamp when this changeset was created.

## discussion() [1/2]

ChangesetDiscussion & osmium::Changeset::discussion | ( |  | ) |

inline

## discussion() [2/2]

const ChangesetDiscussion & osmium::Changeset::discussion | ( |  | ) | const

inline

## do_not_use()

int32_t osmium::Changeset::do_not_use | ( |  | ) | const

inline noexcept

## end() [1/2]

iterator osmium::Changeset::end | ( |  | ) |

inline

## end() [2/2]

const_iterator osmium::Changeset::end | ( |  | ) | const

inline

## id()

changeset_id_type osmium::Changeset::id | ( |  | ) | const

inline noexcept

Get ID of this changeset.

## is_compatible_to()

static constexpr bool osmium::Changeset::is_compatible_to | ( | osmium::item_type | t | ) |

inline static constexpr noexcept

## num_changes()

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

inline noexcept

Get the number of changes in this changeset.

## num_comments()

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

inline noexcept

Get the number of comments in this changeset.

## open()

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

inline noexcept

Is this changeset open?

## set_attribute()

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

inline

Set named attribute.

Parameters

  attr | Name of the attribute (must be one of "id", "version", "changeset", "timestamp", "uid", "visible")
  value | Value of the attribute

## set_closed_at()

Changeset & osmium::Changeset::set_closed_at | ( | const osmium::Timestamp & | timestamp | ) |

inline

Set the timestamp when this changeset was closed.

Parameters

  timestamp | Timestamp

Returns
  Reference to changeset to make calls chainable.

## set_created_at()

Changeset & osmium::Changeset::set_created_at | ( | const osmium::Timestamp & | timestamp | ) |

inline

Set the timestamp when this changeset was created.

Parameters

  timestamp | Timestamp

Returns
  Reference to changeset to make calls chainable.

## set_id() [1/2]

Changeset & osmium::Changeset::set_id | ( | changeset_id_type | id | ) |

inline noexcept

Set ID of this changeset

Parameters

  id | The id.

Returns
  Reference to changeset to make calls chainable.

## set_id() [2/2]

Changeset & osmium::Changeset::set_id | ( | const char * | id | ) |

inline

Set ID of this changeset.

Parameters

  id | The id.

Returns
  Reference to object to make calls chainable.

## set_num_changes() [1/2]

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

inline

Set the number of changes in this changeset.

## set_num_changes() [2/2]

Changeset & osmium::Changeset::set_num_changes | ( | num_changes_type | num_changes | ) |

inline noexcept

Set the number of changes in this changeset.

## set_num_comments() [1/2]

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

inline

Set the number of comments in this changeset.

## set_num_comments() [2/2]

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

inline noexcept

Set the number of comments in this changeset.

## set_uid() [1/2]

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.

## set_uid() [2/2]

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

inline noexcept

Set user id.

Parameters

  uid | The user id.

Returns
  Reference to changeset to make calls chainable.

## set_uid_from_signed()

Changeset & osmium::Changeset::set_uid_from_signed | ( | signed_user_id_type | uid | ) |

inline noexcept

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

Parameters

  uid | The user id.

Returns
  Reference to changeset to make calls chainable.

## set_user_size()

void osmium::Changeset::set_user_size | ( | string_size_type | size | ) |

inline private noexcept

## subitems_position() [1/2]

unsigned char * osmium::Changeset::subitems_position | ( |  | ) |

inline private

## subitems_position() [2/2]

const unsigned char * osmium::Changeset::subitems_position | ( |  | ) | const

inline private

## tags()

const TagList & osmium::Changeset::tags | ( |  | ) | const

inline

Get the list of tags.

## uid()

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

inline noexcept

Get user id.

## user()

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

inline

Get user name.

## user_is_anonymous()

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

inline noexcept

Is this user anonymous?

## user_size()

string_size_type osmium::Changeset::user_size | ( |  | ) | const

inline private noexcept

## Friends And Related Symbol Documentation

## osmium::builder::ChangesetBuilder

friend class osmium::builder::ChangesetBuilder

friend

## Member Data Documentation

## itemtype

constexpr osmium::item_type osmium::Changeset::itemtype = osmium::item_type::changeset

static constexpr

## m_bounds

osmium::Box osmium::Changeset::m_bounds

private

## m_closed_at

osmium::Timestamp osmium::Changeset::m_closed_at

private

## m_created_at

osmium::Timestamp osmium::Changeset::m_created_at

private

## m_id

changeset_id_type osmium::Changeset::m_id = 0

private

## m_num_changes

num_changes_type osmium::Changeset::m_num_changes = 0

private

## m_num_comments

num_comments_type osmium::Changeset::m_num_comments = 0

private

## m_padding1

int16_t osmium::Changeset::m_padding1 = 0

private

## m_padding2

int32_t osmium::Changeset::m_padding2 = 0

private

## m_uid

user_id_type osmium::Changeset::m_uid = 0

private

## m_user_size

string_size_type osmium::Changeset::m_user_size = 0

private

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

- include/osmium/osm/changeset.hpp