Loading...
Searching...
No Matches
osmium::NodeRefList Class Reference

`#include <node_ref_list.hpp>`

Inheritance diagram for osmium::NodeRefList:
[legend]
Collaboration diagram for osmium::NodeRefList:
[legend]

## Public Types

using | value_type = NodeRef
using | reference = NodeRef&
using | const_reference = const NodeRef&
using | iterator = NodeRef*
using | const_iterator = const NodeRef*
using | const_reverse_iterator = std::reverse_iterator<const NodeRef*>
using | difference_type = std::ptrdiff_t
using | size_type = std::size_t

## Public Member Functions

| NodeRefList (osmium::item_type itemtype) noexcept
bool | empty () const noexcept
size_type | size () const noexcept
const NodeRef & | operator[] (size_type n) const noexcept
NodeRef & | operator[] (size_type n) noexcept
const NodeRef & | front () const noexcept
const NodeRef & | back () const noexcept
bool | is_closed () const noexcept
bool | ends_have_same_id () const noexcept
bool | ends_have_same_location () const
osmium::Box | envelope () const noexcept
iterator | begin () noexcept
| Returns an iterator to the beginning.
iterator | end () noexcept
| Returns an iterator to the end.
const_iterator | cbegin () const noexcept
| Returns an iterator to the beginning.
const_iterator | cend () const noexcept
| Returns an iterator to the end.
const_iterator | begin () const noexcept
| Returns an iterator to the beginning.
const_iterator | end () const noexcept
| Returns an iterator to the end.
const_reverse_iterator | crbegin () const noexcept
| Returns a reverse_iterator to the beginning.
const_reverse_iterator | crend () const noexcept
| Returns a reverse_iterator to the end.
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

## Additional Inherited Members

Static Public Member Functions inherited from osmium::memory::Item
static constexpr bool | is_compatible_to (osmium::item_type) noexcept
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 ordered collection of NodeRef objects. Usually this is not instantiated directly, but one of its subclasses are used.

## Member Typedef Documentation

## const_iterator

using osmium::NodeRefList::const_iterator = const NodeRef*

## const_reference

using osmium::NodeRefList::const_reference = const NodeRef&

## const_reverse_iterator

using osmium::NodeRefList::const_reverse_iterator = std::reverse_iterator<const NodeRef*>

## difference_type

using osmium::NodeRefList::difference_type = std::ptrdiff_t

## iterator

using osmium::NodeRefList::iterator = NodeRef*

## reference

using osmium::NodeRefList::reference = NodeRef&

## size_type

using osmium::NodeRefList::size_type = std::size_t

## value_type

using osmium::NodeRefList::value_type = NodeRef

## Constructor & Destructor Documentation

## NodeRefList()

osmium::NodeRefList::NodeRefList | ( | osmium::item_type | itemtype | ) |

inlineexplicitnoexcept

## Member Function Documentation

## back()

const NodeRef & osmium::NodeRefList::back | ( |  | ) | const

inlinenoexcept

Access the last element.

Complexity: Constant.

Precondition
  !empty()
  osmium::NodeRefList::empty
  bool empty() const noexcept
  Definition node_ref_list.hpp:74

## begin() [1/2]

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

inlinenoexcept

Returns an iterator to the beginning.

## begin() [2/2]

iterator osmium::NodeRefList::begin | ( |  | ) |

inlinenoexcept

Returns an iterator to the beginning.

## cbegin()

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

inlinenoexcept

Returns an iterator to the beginning.

## cend()

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

inlinenoexcept

Returns an iterator to the end.

## crbegin()

const_reverse_iterator osmium::NodeRefList::crbegin | ( |  | ) | const

inlinenoexcept

Returns a reverse_iterator to the beginning.

## crend()

const_reverse_iterator osmium::NodeRefList::crend | ( |  | ) | const

inlinenoexcept

Returns a reverse_iterator to the end.

## empty()

bool osmium::NodeRefList::empty | ( |  | ) | const

inlinenoexcept

Checks whether the collection is empty.

Complexity: Constant.

## end() [1/2]

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

inlinenoexcept

Returns an iterator to the end.

## end() [2/2]

iterator osmium::NodeRefList::end | ( |  | ) |

inlinenoexcept

Returns an iterator to the end.

## ends_have_same_id()

bool osmium::NodeRefList::ends_have_same_id | ( |  | ) | const

inlinenoexcept

Checks whether the first and last node in the collection have the same ID. The locations are not checked.

Complexity: Constant.

Precondition
  !empty()

## ends_have_same_location()

bool osmium::NodeRefList::ends_have_same_location | ( |  | ) | const

inline

Checks whether the first and last node in the collection have the same location. The IDs are not checked.

Complexity: Constant.

Precondition
  !empty()
  front().location() && back().location()
  osmium::NodeRefList::front
  const NodeRef & front() const noexcept
  Definition node_ref_list.hpp:126
  osmium::NodeRefList::back
  const NodeRef & back() const noexcept
  Definition node_ref_list.hpp:138
  osmium::NodeRef::location
  osmium::Location & location() noexcept
  Definition node_ref.hpp:85

## envelope()

osmium::Box osmium::NodeRefList::envelope | ( |  | ) | const

inlinenoexcept

Calculate the envelope of this node ref list. If the locations are not set, the resulting box will be invalid.

Complexity: Linear in the number of elements.

## front()

const NodeRef & osmium::NodeRefList::front | ( |  | ) | const

inlinenoexcept

Access the first element.

Complexity: Constant.

Precondition
  !empty()

## is_closed()

bool osmium::NodeRefList::is_closed | ( |  | ) | const

inlinenoexcept

Checks whether the first and last node in the collection have the same ID. The locations are not checked.

Complexity: Constant.

Precondition
  !empty()

## operator[]() [1/2]

const NodeRef & osmium::NodeRefList::operator[] | ( | size_type | n | ) | const

inlinenoexcept

Access specified element.

Complexity: Constant.

Precondition
  n < size()
  osmium::NodeRefList::size
  size_type size() const noexcept
  Definition node_ref_list.hpp:83

Parameters

  n | Get the n-th element of the collection.

## operator[]() [2/2]

NodeRef & osmium::NodeRefList::operator[] | ( | size_type | n | ) |

inlinenoexcept

Access specified element.

Complexity: Constant.

Precondition
  n < size()

Parameters

  n | Get the n-th element of the collection.

## size()

size_type osmium::NodeRefList::size | ( |  | ) | const

inlinenoexcept

Returns the number of NodeRefs in the collection.

Complexity: Constant.

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

- include/osmium/osm/node_ref_list.hpp