Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <osm_object_builder.hpp>
Public Member Functions | |
OSMObjectBuilder (osmium::memory::Buffer &buffer, Builder *parent=nullptr) | |
T & | object () noexcept |
const T & | cobject () const noexcept |
TDerived & | set_user (const char *user, const string_size_type length) |
TDerived & | set_user (const char *user) |
TDerived & | set_user (const std::string &user) |
void | add_tags (const std::initializer_list< std::pair< const char *, const char * > > &tags) |
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. More... | |
void | add_item (const osmium::memory::Item &item) |
Private Types | |
using | type = TDerived |
Private Member Functions | |
void | set_user_size (string_size_type size) noexcept |
Static Private Attributes | |
static constexpr const std::size_t | min_size_for_user = osmium::memory::padded_length(sizeof(string_size_type) + 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) |
|
private |
|
inlineexplicit |
|
inline |
|
inlinenoexcept |
Get a const reference to the object being 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.
|
inlinenoexcept |
Get a reference to the object being 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.
|
inline |
Set user name.
user | Pointer to \0-terminated user name. |
|
inline |
Set user name.
user | Pointer to user name. |
length | Length of user name (without \0 termination). |
|
inline |
Set user name.
user | User name. |
|
inlineprivatenoexcept |
|
staticconstexprprivate |