Libosmium
2.20.0
Fast and flexible C++ library for working with OpenStreetMap data
|
#include <object.hpp>
Public Types | |
using | iterator = osmium::memory::CollectionIterator< Item > |
using | const_iterator = osmium::memory::CollectionIterator< const Item > |
template<typename T > | |
using | t_iterator = osmium::memory::ItemIterator< T > |
template<typename T > | |
using | t_const_iterator = osmium::memory::ItemIterator< const T > |
Public Member Functions | |
object_id_type | id () const noexcept |
Get ID of this object. More... | |
unsigned_object_id_type | positive_id () const noexcept |
Get absolute value of the ID of this object. More... | |
OSMObject & | set_id (object_id_type id) noexcept |
OSMObject & | set_id (const char *id) |
bool | deleted () const noexcept |
Is this object marked as deleted? More... | |
bool | visible () const noexcept |
Is this object marked visible (ie not deleted)? More... | |
OSMObject & | set_deleted (bool deleted) noexcept |
OSMObject & | set_visible (bool visible) noexcept |
OSMObject & | set_visible (const char *visible) |
object_version_type | version () const noexcept |
Get version of this object. More... | |
OSMObject & | set_version (object_version_type version) noexcept |
OSMObject & | set_version (const char *version) |
changeset_id_type | changeset () const noexcept |
Get changeset id of this object. More... | |
OSMObject & | set_changeset (changeset_id_type changeset) noexcept |
OSMObject & | set_changeset (const char *changeset) |
user_id_type | uid () const noexcept |
Get user id of this object. More... | |
OSMObject & | set_uid (user_id_type uid) noexcept |
OSMObject & | set_uid_from_signed (signed_user_id_type uid) noexcept |
OSMObject & | set_uid (const char *uid) |
bool | user_is_anonymous () const noexcept |
Is this user anonymous? More... | |
osmium::Timestamp | timestamp () const noexcept |
Get timestamp when this object last changed. More... | |
OSMObject & | set_timestamp (const osmium::Timestamp ×tamp) noexcept |
OSMObject & | set_timestamp (const char *timestamp) |
const char * | user () const noexcept |
Get user name for this object. More... | |
void | clear_user () noexcept |
Clear user name. More... | |
const TagList & | tags () const |
Get the list of tags for this object. More... | |
const char * | get_value_by_key (const char *key, const char *default_value=nullptr) const noexcept |
OSMObject & | set_attribute (const char *attr, const char *value) |
void | remove_tags () noexcept |
iterator | begin () |
iterator | end () |
const_iterator | cbegin () const |
const_iterator | cend () const |
const_iterator | begin () const |
const_iterator | end () const |
template<typename T > | |
osmium::memory::ItemIteratorRange< T > | subitems () |
template<typename T > | |
osmium::memory::ItemIteratorRange< const T > | subitems () const |
template<typename T > | |
t_iterator< T > | begin () |
template<typename T > | |
t_iterator< T > | end () |
template<typename T > | |
t_const_iterator< T > | cbegin () const |
template<typename T > | |
t_const_iterator< T > | cend () const |
template<typename T > | |
t_const_iterator< T > | begin () const |
template<typename T > | |
t_const_iterator< T > | end () 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 |
Protected Member Functions | |
OSMObject (osmium::memory::item_size_type size, osmium::item_type type) | |
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 |
Private Member Functions | |
size_t | sizeof_object () const noexcept |
unsigned char * | user_position () noexcept |
const unsigned char * | user_position () const noexcept |
string_size_type | user_size () const noexcept |
unsigned char * | subitems_position () |
const unsigned char * | subitems_position () const |
Private Attributes | |
object_id_type | m_id = 0 |
bool | m_deleted: 1 |
object_version_type | m_version: 31 |
osmium::Timestamp | m_timestamp {} |
user_id_type | m_uid = 0 |
changeset_id_type | m_changeset = 0 |
Friends | |
template<typename TDerived , typename T > | |
class | osmium::builder::OSMObjectBuilder |
using osmium::OSMObject::t_const_iterator = osmium::memory::ItemIterator<const T> |
using osmium::OSMObject::t_iterator = osmium::memory::ItemIterator<T> |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
Get changeset id of this object.
|
inlinenoexcept |
Clear user name.
|
inlinenoexcept |
Is this object marked as deleted?
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
Get tag value by key.
Convenience function that will forward to same function on TagList object.
|
inlinenoexcept |
Get ID of this object.
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
Get absolute value of the ID of this object.
|
inlinenoexcept |
Remove all tags from this object.
(This will not change the size of the object, the tags are simply marked as removed.)
|
inline |
Set named attribute.
attr | Name of the attribute (must be one of "id", "version", "changeset", "timestamp", "uid", "visible") |
value | Value of the attribute |
|
inlinenoexcept |
Set changeset id of this object.
|
inline |
Set changeset id of this object.
|
inlinenoexcept |
Mark this object as deleted (or not).
|
inline |
Set ID of this object.
|
inlinenoexcept |
Set ID of this object.
|
inline |
Set the timestamp when this object last changed.
timestamp | Timestamp in ISO format. |
std::invalid_argment | if the timestamp isn't a correctly ISO formatted string with the Z timezone. |
|
inlinenoexcept |
Set the timestamp when this object last changed.
timestamp | Timestamp |
|
inline |
Set user id of this object.
|
inlinenoexcept |
Set user id of this object.
|
inlinenoexcept |
Set user id of this object. Sets uid to 0 (anonymous) if the given uid is smaller than 0.
|
inline |
Set object version.
|
inlinenoexcept |
Set object version.
|
inlinenoexcept |
Mark this object as visible (ie not deleted) (or not).
|
inline |
Mark this object as visible (ie not deleted) or deleted.
visible | Either "true" or "false" |
|
inlineprivatenoexcept |
|
inline |
Get a range of subitems of a specific type.
The | type (must be derived from osmium::memory::Item). |
|
inline |
Get a range of subitems of a specific type.
The | type (must be derived from osmium::memory::Item). |
|
inlineprivate |
|
inlineprivate |
|
inline |
Get the list of tags for this object.
|
inlinenoexcept |
Get timestamp when this object last changed.
|
inlinenoexcept |
Get user id of this object.
|
inlinenoexcept |
Get user name for this object.
|
inlinenoexcept |
Is this user anonymous?
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
|
inlinenoexcept |
Get version of this object.
|
inlinenoexcept |
Is this object marked visible (ie not deleted)?
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |