attr.hpp File Reference
`#include <cstddef>`
`#include <cstdint>`
`#include <ctime>`
`#include <initializer_list>`
`#include <iterator>`
`#include <string>`
`#include <tuple>`
`#include <type_traits>`
`#include <utility>`
`#include <osmium/builder/builder.hpp>`
`#include <osmium/builder/osm_object_builder.hpp>`
`#include <osmium/memory/buffer.hpp>`
`#include <osmium/osm/types.hpp>`
`#include <osmium/osm.hpp>`
Include dependency graph for attr.hpp:

Go to the source code of this file.

## Classes

class | member_type
class | comment_type
struct | detail::changeset_handler
struct | detail::object_handler
struct | detail::node_handler
struct | detail::tags_handler
struct | detail::nodes_handler
struct | detail::members_handler
struct | detail::discussion_handler
struct | detail::ring_handler
struct | detail::any_node_handlers
struct | detail::any_way_handlers
struct | detail::any_relation_handlers
struct | detail::any_area_handlers
struct | detail::any_changeset_handlers

## Namespaces

| osmium
| Namespace for everything in the Osmium library.
| osmium::builder
| Classes for building OSM objects and other items in buffers.
| osmium::builder::attr
| detail

## Macros

#define | OSMIUM_ATTRIBUTE(_handler, _name, _type)
#define | OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR(_handler, _name, _type)
#define | OSMIUM_ATTRIBUTE_ITER(_handler, _name)

## Typedefs

using | pair_of_cstrings = std::pair< const char *const, const char *const >
using | pair_of_strings = std::pair< const std::string &, const std::string & >
using | tag_ilist = std::initializer_list< std::pair< const char *, const char * >>
using | object_id_ilist = std::initializer_list< osmium::object_id_type >
using | node_ref_ilist = std::initializer_list< osmium::NodeRef >
using | member_ilist = std::initializer_list< member_type >
using | comment_ilist = std::initializer_list< comment_type >

## Functions

| osmium::builder::attr::OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (object_handler, _id, osmium::object_id_type)
| osmium::builder::attr::OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (object_handler, _version, osmium::object_version_type)
| osmium::builder::attr::OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (entity_handler, _uid, osmium::user_id_type)
| osmium::builder::attr::OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (entity_handler, _cid, osmium::changeset_id_type)
constexpr | osmium::builder::attr::_deleted (bool value=true) noexcept
constexpr | osmium::builder::_visible (bool value=true) noexcept
constexpr | osmium::_timestamp (const osmium::Timestamp &value) noexcept
constexpr | osmium::_timestamp (time_t value) noexcept
constexpr | osmium::_timestamp (uint32_t value) noexcept
| osmium::_timestamp (const char *value)
| osmium::_timestamp (const std::string &value)
constexpr | _location (const osmium::Location &value) noexcept
| _location (double lat, double lon)
constexpr | _user (const char *val) noexcept
| _user (const std::string &val) noexcept
| detail::OSMIUM_ATTRIBUTE_ITER (tags_handler, tags_from_iterator_pair)
| detail::OSMIUM_ATTRIBUTE_ITER (nodes_handler, nodes_from_iterator_pair)
| detail::OSMIUM_ATTRIBUTE_ITER (members_handler, members_from_iterator_pair)
| detail::OSMIUM_ATTRIBUTE_ITER (discussion_handler, comments_from_iterator_pair)
| detail::OSMIUM_ATTRIBUTE_ITER (ring_handler, outer_ring_from_iterator_pair)
| detail::OSMIUM_ATTRIBUTE_ITER (ring_handler, inner_ring_from_iterator_pair)
| _tag (const pair_of_cstrings &value) noexcept
| _tag (const std::pair< const char *const, const char * > &value)
| _tag (const std::pair< const char *, const char * > &value)
| _tag (const pair_of_strings &value)
| _tag (const char *key, const char *val)
| _tag (const std::string &key, const std::string &val)
template<typename TTagIterator >
constexpr detail::tags_from_iterator_pair< TTagIterator > | _tags (TTagIterator first, TTagIterator last)
template<typename TContainer >
detail::tags_from_iterator_pair< typename TContainer::const_iterator > | _tags (const TContainer &container)
detail::tags_from_iterator_pair< tag_ilist::const_iterator > | _tags (const tag_ilist &container)
constexpr | _node (osmium::object_id_type value) noexcept
constexpr | _node (const NodeRef &value) noexcept
template<typename TIdIterator >
constexpr detail::nodes_from_iterator_pair< TIdIterator > | _nodes (TIdIterator first, TIdIterator last)
template<typename TContainer >
detail::nodes_from_iterator_pair< typename TContainer::const_iterator > | _nodes (const TContainer &container)
detail::nodes_from_iterator_pair< object_id_ilist::const_iterator > | _nodes (const object_id_ilist &container)
detail::nodes_from_iterator_pair< node_ref_ilist::const_iterator > | _nodes (const node_ref_ilist &container)
constexpr | _member (const member_type &value) noexcept
constexpr | _member (osmium::item_type type, osmium::object_id_type id) noexcept
constexpr | _member (osmium::item_type type, osmium::object_id_type id, const char *role) noexcept
| _member (osmium::item_type type, osmium::object_id_type id, const std::string &role) noexcept
| _member (const osmium::RelationMember &member) noexcept
template<typename TMemberIterator >
constexpr detail::members_from_iterator_pair< TMemberIterator > | _members (TMemberIterator first, TMemberIterator last)
template<typename TContainer >
detail::members_from_iterator_pair< typename TContainer::const_iterator > | _members (const TContainer &container)
detail::members_from_iterator_pair< member_ilist::const_iterator > | _members (const member_ilist &container)
| OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (changeset_handler, _num_changes, osmium::num_changes_type)
| OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (changeset_handler, _num_comments, osmium::num_comments_type)
| OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (changeset_handler, _created_at, osmium::Timestamp)
| OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR (changeset_handler, _closed_at, osmium::Timestamp)
constexpr | _comment (const comment_type &value) noexcept
| _comment (const osmium::ChangesetComment &comment) noexcept
template<typename TCommentIterator >
constexpr detail::comments_from_iterator_pair< TCommentIterator > | _comments (TCommentIterator first, TCommentIterator last)
template<typename TContainer >
detail::comments_from_iterator_pair< typename TContainer::const_iterator > | _comments (const TContainer &container)
detail::comments_from_iterator_pair< comment_ilist::const_iterator > | _comments (const comment_ilist &container)
template<typename TIdIterator >
constexpr detail::outer_ring_from_iterator_pair< TIdIterator > | _outer_ring (TIdIterator first, TIdIterator last)
template<typename TContainer >
detail::outer_ring_from_iterator_pair< typename TContainer::const_iterator > | _outer_ring (const TContainer &container)
detail::outer_ring_from_iterator_pair< object_id_ilist::const_iterator > | _outer_ring (const object_id_ilist &container)
detail::outer_ring_from_iterator_pair< node_ref_ilist::const_iterator > | _outer_ring (const node_ref_ilist &container)
template<typename TIdIterator >
constexpr detail::inner_ring_from_iterator_pair< TIdIterator > | _inner_ring (TIdIterator first, TIdIterator last)
template<typename TContainer >
detail::inner_ring_from_iterator_pair< typename TContainer::const_iterator > | _inner_ring (const TContainer &container)
detail::inner_ring_from_iterator_pair< object_id_ilist::const_iterator > | _inner_ring (const object_id_ilist &container)
detail::inner_ring_from_iterator_pair< node_ref_ilist::const_iterator > | _inner_ring (const node_ref_ilist &container)
template<typename THandler , typename TBuilder , typename... TArgs>
void | detail::add_basic (TBuilder &builder, const TArgs &...args) noexcept
template<typename... TArgs>
constexpr const char * | detail::get_user (const attr::_user &user, const TArgs &...) noexcept
constexpr const char * | detail::get_user () noexcept
template<typename TFirst , typename... TRest>
constexpr std::enable_if<!std::is_same< attr::_user, TFirst >::value, const char * >::type | detail::get_user (const TFirst &, const TRest &...args) noexcept
template<typename TBuilder , typename... TArgs>
void | detail::add_user (TBuilder &builder, const TArgs &...args)
template<typename TBuilder , typename THandler , typename... TArgs>
std::enable_if<!is_handled_by< THandler, TArgs... >::value >::type | detail::add_list (osmium::builder::Builder &, const TArgs &...) noexcept
template<typename TBuilder , typename THandler , typename... TArgs>
std::enable_if< is_handled_by< THandler, TArgs... >::value >::type | detail::add_list (osmium::builder::Builder &parent, const TArgs &...args)
template<typename... TArgs>
size_t | add_node (osmium::memory::Buffer &buffer, const TArgs &...args)
template<typename... TArgs>
size_t | add_way (osmium::memory::Buffer &buffer, const TArgs &...args)
template<typename... TArgs>
size_t | add_relation (osmium::memory::Buffer &buffer, const TArgs &...args)
template<typename... TArgs>
size_t | add_changeset (osmium::memory::Buffer &buffer, const TArgs &...args)
template<typename... TArgs>
size_t | add_area (osmium::memory::Buffer &buffer, const TArgs &...args)
template<typename... TArgs>
size_t | add_way_node_list (osmium::memory::Buffer &buffer, const TArgs &...args)
template<typename... TArgs>
size_t | add_tag_list (osmium::memory::Buffer &buffer, const TArgs &...args)

## Macro Definition Documentation

#define OSMIUM_ATTRIBUTE | ( |  | _handler,
|  |  | _name,
|  |  | _type
| ) |  |

Value:
struct _name : public osmium::builder::detail::type_wrapper<_type> { \
using handler = osmium::builder::detail::_handler;

#define OSMIUM_ATTRIBUTE_ITER | ( |  | _handler,
|  |  | _name
| ) |  |

Value:
template <typename TIterator> \
struct _name : public osmium::builder::detail::iterator_wrapper<TIterator> { \
using handler = osmium::builder::detail::_handler; \
constexpr _name(TIterator first, TIterator last) : \
osmium::builder::detail::iterator_wrapper<TIterator>(first, last) {} \
}
osmium
Namespace for everything in the Osmium library.
Definition: assembler.hpp:59
detail
Definition: attr.hpp:298

#define OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR | ( |  | _handler,
|  |  | _name,
|  |  | _type
| ) |  |

Value:
OSMIUM_ATTRIBUTE(_handler, _name, _type) \
constexpr explicit _name(std::add_const<_type>::type& value) : \
type_wrapper(value) {} \
}
osmium::osm_entity_bits::type
type
Definition: entity_bits.hpp:60
OSMIUM_ATTRIBUTE
#define OSMIUM_ATTRIBUTE(_handler, _name, _type)
Definition: attr.hpp:171

## Typedef Documentation

using comment_ilist = std::initializer_list<comment_type>

using member_ilist = std::initializer_list<member_type>

typedef std::initializer_list< osmium::NodeRef > node_ref_ilist

typedef std::initializer_list< osmium::object_id_type > object_id_ilist

using pair_of_cstrings = std::pair<const char* const, const char* const>

using pair_of_strings = std::pair<const std::string&, const std::string&>

using tag_ilist = std::initializer_list<std::pair<const char*, const char*>>

## Function Documentation

constexpr _comment | ( | const comment_type & | value | ) |

explicit noexcept

_comment | ( | const osmium::ChangesetComment & | comment | ) |

explicit noexcept

template<typename TCommentIterator >

constexpr detail::comments_from_iterator_pair<TCommentIterator> _comments | ( | TCommentIterator | first,
|  | TCommentIterator | last
| ) |  |

inline

template<typename TContainer >

detail::comments_from_iterator_pair<typename TContainer::const_iterator> _comments | ( | const TContainer & | container | ) |

inline

detail::comments_from_iterator_pair<comment_ilist::const_iterator> _comments | ( | const comment_ilist & | container | ) |

inline

template<typename TIdIterator >

constexpr detail::inner_ring_from_iterator_pair<TIdIterator> _inner_ring | ( | TIdIterator | first,
|  | TIdIterator | last
| ) |  |

inline

template<typename TContainer >

detail::inner_ring_from_iterator_pair<typename TContainer::const_iterator> _inner_ring | ( | const TContainer & | container | ) |

inline

detail::inner_ring_from_iterator_pair<object_id_ilist::const_iterator> _inner_ring | ( | const object_id_ilist & | container | ) |

inline

detail::inner_ring_from_iterator_pair<node_ref_ilist::const_iterator> _inner_ring | ( | const node_ref_ilist & | container | ) |

inline

constexpr _location | ( | const osmium::Location & | value | ) |

explicit noexcept

_location | ( | double | lat,
|  | double | lon
| ) |  |

explicit

constexpr _member | ( | const member_type & | value | ) |

explicit noexcept

constexpr _member | ( | osmium::item_type | type,
|  | osmium::object_id_type | id
| ) |  |

explicit noexcept

constexpr _member | ( | osmium::item_type | type,
|  | osmium::object_id_type | id,
|  | const char * | role
| ) |  |

explicit noexcept

_member | ( | osmium::item_type | type,
|  | osmium::object_id_type | id,
|  | const std::string & | role
| ) |  |

explicit noexcept

_member | ( | const osmium::RelationMember & | member | ) |

explicit noexcept

template<typename TMemberIterator >

constexpr detail::members_from_iterator_pair<TMemberIterator> _members | ( | TMemberIterator | first,
|  | TMemberIterator | last
| ) |  |

inline

template<typename TContainer >

detail::members_from_iterator_pair<typename TContainer::const_iterator> _members | ( | const TContainer & | container | ) |

inline

detail::members_from_iterator_pair<member_ilist::const_iterator> _members | ( | const member_ilist & | container | ) |

inline

constexpr _node | ( | osmium::object_id_type | value | ) |

explicit noexcept

constexpr _node | ( | const NodeRef & | value | ) |

explicit noexcept

template<typename TIdIterator >

constexpr detail::nodes_from_iterator_pair<TIdIterator> _nodes | ( | TIdIterator | first,
|  | TIdIterator | last
| ) |  |

inline

template<typename TContainer >

detail::nodes_from_iterator_pair<typename TContainer::const_iterator> _nodes | ( | const TContainer & | container | ) |

inline

detail::nodes_from_iterator_pair<object_id_ilist::const_iterator> _nodes | ( | const object_id_ilist & | container | ) |

inline

detail::nodes_from_iterator_pair<node_ref_ilist::const_iterator> _nodes | ( | const node_ref_ilist & | container | ) |

inline

template<typename TIdIterator >

constexpr detail::outer_ring_from_iterator_pair<TIdIterator> _outer_ring | ( | TIdIterator | first,
|  | TIdIterator | last
| ) |  |

inline

template<typename TContainer >

detail::outer_ring_from_iterator_pair<typename TContainer::const_iterator> _outer_ring | ( | const TContainer & | container | ) |

inline

detail::outer_ring_from_iterator_pair<object_id_ilist::const_iterator> _outer_ring | ( | const object_id_ilist & | container | ) |

inline

detail::outer_ring_from_iterator_pair<node_ref_ilist::const_iterator> _outer_ring | ( | const node_ref_ilist & | container | ) |

inline

_tag | ( | const pair_of_cstrings & | value | ) |

explicit noexcept

_tag | ( | const std::pair< const char *const, const char * > & | value | ) |

explicit

_tag | ( | const std::pair< const char *, const char * > & | value | ) |

explicit

_tag | ( | const pair_of_strings & | value | ) |

explicit

_tag | ( | const char * | key,
|  | const char * | val
| ) |  |

explicit

_tag | ( | const std::string & | key,
|  | const std::string & | val
| ) |  |

explicit

template<typename TTagIterator >

constexpr detail::tags_from_iterator_pair<TTagIterator> _tags | ( | TTagIterator | first,
|  | TTagIterator | last
| ) |  |

inline

template<typename TContainer >

detail::tags_from_iterator_pair<typename TContainer::const_iterator> _tags | ( | const TContainer & | container | ) |

inline

detail::tags_from_iterator_pair<tag_ilist::const_iterator> _tags | ( | const tag_ilist & | container | ) |

inline

constexpr _user | ( | const char * | val | ) |

explicit noexcept

_user | ( | const std::string & | val | ) |

explicit noexcept

template<typename... TArgs>

size_t add_area | ( | osmium::memory::Buffer & | buffer,
|  | const TArgs &... | args
| ) |  |

inline

Create a area using the given arguments and add it to the given buffer.

Parameters

  buffer | The buffer to which the area will be added.
  args | The attributes of the area.

Returns
  The position in the buffer where this area was added.

template<typename... TArgs>

size_t add_changeset | ( | osmium::memory::Buffer & | buffer,
|  | const TArgs &... | args
| ) |  |

inline

Create a changeset using the given arguments and add it to the given buffer.

Parameters

  buffer | The buffer to which the changeset will be added.
  args | The attributes of the changeset.

Returns
  The position in the buffer where this changeset was added.

template<typename... TArgs>

size_t add_node | ( | osmium::memory::Buffer & | buffer,
|  | const TArgs &... | args
| ) |  |

inline

Create a node using the given arguments and add it to the given buffer.

Parameters

  buffer | The buffer to which the node will be added.
  args | The attributes of the node.

Returns
  The position in the buffer where this node was added.

template<typename... TArgs>

size_t add_relation | ( | osmium::memory::Buffer & | buffer,
|  | const TArgs &... | args
| ) |  |

inline

Create a relation using the given arguments and add it to the given buffer.

Parameters

  buffer | The buffer to which the relation will be added.
  args | The attributes of the relation.

Returns
  The position in the buffer where this relation was added.

template<typename... TArgs>

size_t add_tag_list | ( | osmium::memory::Buffer & | buffer,
|  | const TArgs &... | args
| ) |  |

inline

Create a TagList using the given arguments and add it to the given buffer.

Parameters

  buffer | The buffer to which the list will be added.
  args | The contents of the list.

Returns
  The position in the buffer where this list was added.

template<typename... TArgs>

size_t add_way | ( | osmium::memory::Buffer & | buffer,
|  | const TArgs &... | args
| ) |  |

inline

Create a way using the given arguments and add it to the given buffer.

Parameters

  buffer | The buffer to which the way will be added.
  args | The attributes of the way.

Returns
  The position in the buffer where this way was added.

template<typename... TArgs>

size_t add_way_node_list | ( | osmium::memory::Buffer & | buffer,
|  | const TArgs &... | args
| ) |  |

inline

Create a WayNodeList using the given arguments and add it to the given buffer.

Parameters

  buffer | The buffer to which the list will be added.
  args | The contents of the list.

Returns
  The position in the buffer where this list was added.

OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR | ( | changeset_handler | ,
|  | _num_changes | ,
|  | osmium::num_changes_type |
| ) |  |

OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR | ( | changeset_handler | ,
|  | _num_comments | ,
|  | osmium::num_comments_type |
| ) |  |

OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR | ( | changeset_handler | ,
|  | _created_at | ,
|  | osmium::Timestamp |
| ) |  |

OSMIUM_ATTRIBUTE_WITH_CONSTRUCTOR | ( | changeset_handler | ,
|  | _closed_at | ,
|  | osmium::Timestamp |
| ) |  |