osmium::NodeRefList Class Reference

`#include <node_ref_list.hpp>`

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

## Public Types

using | iterator = NodeRef *
using | const_iterator = const NodeRef *
using | const_reverse_iterator = std::reverse_iterator< const NodeRef * >

## Public Member Functions

| NodeRefList (osmium::item_type itemtype) noexcept
bool | empty () const noexcept
size_t | size () const noexcept
const NodeRef & | operator[] (size_t n) const 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
iterator | begin () noexcept
| Returns an iterator to the beginning. More...
iterator | end () noexcept
| Returns an iterator to the end. More...
const_iterator | cbegin () const noexcept
| Returns an iterator to the beginning. More...
const_iterator | cend () const noexcept
| Returns an iterator to the end. More...
const_iterator | begin () const noexcept
| Returns an iterator to the beginning. More...
const_iterator | end () const noexcept
| Returns an iterator to the end. More...
const_reverse_iterator | crbegin () const noexcept
| Returns a reverse_iterator to the beginning. More...
const_reverse_iterator | crend () const noexcept
| Returns a reverse_iterator to the end. More...
Public Member Functions inherited from osmium::memory::Item
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 (bool removed) noexcept

## Additional Inherited Members

Protected Member Functions inherited from osmium::memory::Item
| Item (item_size_type size=0, item_type type=item_type()) noexcept
| Item (const Item &)=delete
| Item (Item &&)=delete
Item & | operator= (const Item &)=delete
Item & | operator= (Item &&)=delete
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

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

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

using osmium::NodeRefList::iterator = NodeRef*

## Constructor & Destructor Documentation

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

inline explicit noexcept

## Member Function Documentation

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

inline noexcept

Access the last element.

Precondition
  !empty()

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

inline noexcept

Returns an iterator to the beginning.

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

inline noexcept

Returns an iterator to the beginning.

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

inline noexcept

Returns an iterator to the beginning.

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

inline noexcept

Returns an iterator to the end.

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

inline noexcept

Returns a reverse_iterator to the beginning.

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

inline noexcept

Returns a reverse_iterator to the end.

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

inline noexcept

Checks whether the collection is empty.

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

inline noexcept

Returns an iterator to the end.

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

inline noexcept

Returns an iterator to the end.

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

inline noexcept

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

Precondition
  !empty()

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.

Precondition
  !empty()
  front().location() && back().location()

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

inline noexcept

Access the first element.

Precondition
  !empty()

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

inline noexcept

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

Precondition
  !empty()

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

inline noexcept

Access specified element.

Precondition
  n < size()

Parameters

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

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

inline noexcept

Returns the number of NodeRefs in the collection.

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

- osmium/osm/node_ref_list.hpp