Libosmium: osmium::builder::ChangesetBuilder Class Reference

Libosmium Fast and flexible C++ library for working with OpenStreetMap data

Loading...
Searching...
No Matches
Public Member Functions | Private Types | Static Private Attributes | List of all members
osmium::builder::ChangesetBuilder Class Reference

`#include <osm_object_builder.hpp>`

Inheritance diagram for osmium::builder::ChangesetBuilder:
[legend]
Collaboration diagram for osmium::builder::ChangesetBuilder:
[legend]

## Public Member Functions
| ChangesetBuilder (osmium::memory::Buffer &buffer, Builder *parent=nullptr)
Changeset & | object () noexcept
const Changeset & | cobject () const noexcept
ChangesetBuilder & | set_bounds (const osmium::Box &box) noexcept
ChangesetBuilder & | set_user (const char *user, const string_size_type length)
ChangesetBuilder & | set_user (const char *user)
ChangesetBuilder & | set_user (const std::string &user)
Public Member Functions inherited from osmium::builder::Builder
| Builder (const Builder &)=delete
| Builder (Builder &&)=delete
Builder & | operator= (const Builder &)=delete
Builder & | operator= (Builder &&)=delete
osmium::memory::Buffer & | buffer () noexcept
| Return the buffer this builder is using.
void | add_item (const osmium::memory::Item &item)

## Private Types
using | type = ChangesetBuilder

## Static Private Attributes
static constexpr const std::size_t | min_size_for_user = osmium::memory::padded_length(1)

## Additional Inherited Members
Protected Member Functions inherited from osmium::builder::Builder
| Builder (osmium::memory::Buffer &buffer, Builder *parent, osmium::memory::item_size_type size)
| ~Builder () noexcept
unsigned char * | item_pos () const noexcept
osmium::memory::Item & | item () const noexcept
unsigned char * | reserve_space (std::size_t size)
void | add_padding (bool self=false)
void | add_size (osmium::memory::item_size_type size)
uint32_t | size () const noexcept
template<typename T>
T * | reserve_space_for ()
osmium::memory::item_size_type | append (const char *data, const osmium::memory::item_size_type length)
osmium::memory::item_size_type | append_with_zero (const char *data, const osmium::memory::item_size_type length)
osmium::memory::item_size_type | append (const char *str)

## Member Typedef Documentation

## ◆ type

using osmium::builder::ChangesetBuilder::type = ChangesetBuilder
| private

## Constructor & Destructor Documentation

## ◆ ChangesetBuilder()

osmium::builder::ChangesetBuilder::ChangesetBuilder | ( | osmium::memory::Buffer & | buffer,
|  | Builder * | parent = nullptr )
| inlineexplicit

## Member Function Documentation

## ◆ cobject()

const Changeset & osmium::builder::ChangesetBuilder::cobject | ( |  | ) | const
| inlinenoexcept

Get a const reference to the changeset buing built.

Note that this reference will be invalidated by every action on the builder that might make the buffer grow. This includes calls to set_user() and any time a new sub-builder is created.

## ◆ object()

Changeset & osmium::builder::ChangesetBuilder::object | ( |  | ) |
| inlinenoexcept

Get a reference to the changeset buing built.

Note that this reference will be invalidated by every action on the builder that might make the buffer grow. This includes calls to set_user() and any time a new sub-builder is created.

## ◆ set_bounds()

ChangesetBuilder & osmium::builder::ChangesetBuilder::set_bounds | ( | const osmium::Box & | box | ) |
| inlinenoexcept

## ◆ set_user() [1/3]

ChangesetBuilder & osmium::builder::ChangesetBuilder::set_user | ( | const char * | user | ) |
| inline

Set user name.

Parameters

  user | Pointer to \0-terminated user name.

Precondition
  strlen(user) < 2^16 - 1

## ◆ set_user() [2/3]

ChangesetBuilder & osmium::builder::ChangesetBuilder::set_user | ( | const char * | user,
|  | const string_size_type | length )
| inline

Set user name.

Parameters

  user | Pointer to user name.
  length | Length of user name (without \0 termination).

## ◆ set_user() [3/3]

ChangesetBuilder & osmium::builder::ChangesetBuilder::set_user | ( | const std::string & | user | ) |
| inline

Set user name.

Parameters

  user | User name.

Precondition
  user.size() < 2^16 - 1

## Member Data Documentation

## ◆ min_size_for_user

const std::size_t osmium::builder::ChangesetBuilder::min_size_for_user = osmium::memory::padded_length(1)
| staticconstexprprivate

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

- include/osmium/builder/osm_object_builder.hpp