vg
tools for working with variation graphs
Public Types | Public Member Functions | Public Attributes | List of all members
vg::VectorView< Item >::const_iterator Struct Reference

Random access iterator. More...

#include <utility.hpp>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = const Item
 
using pointer = const Item *
 
using reference = const Item &
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

const_iteratoroperator++ ()
 Advance the iterator. Pre-increment. More...
 
const_iteratoroperator-- ()
 De-advance the iterator. Pre-decrement. More...
 
const_iteratoroperator+= (const difference_type &difference)
 Advance the iterator by a distance, in place. More...
 
const_iteratoroperator-= (const difference_type &difference)
 De-advance the iterator by a distance, in place. More...
 
const_iterator operator++ (int)
 Advance the iterator. Post-increment. More...
 
const_iterator operator-- (int)
 De-advance the iterator. Post-decrement. More...
 
const_iterator operator+ (const difference_type &difference) const
 Advance the iterator by a distance, copying. More...
 
const_iterator operator- (const difference_type &difference) const
 De-advance the iterator by a distance, copying. More...
 
difference_type operator- (const const_iterator &other) const
 Get a difference of iterators on the same container. More...
 
bool operator== (const const_iterator &other) const
 Check if two iterators on the same container are equal. More...
 
bool operator!= (const const_iterator &other) const
 Check if two iterators on the same container are not equal. More...
 
const Item & operator* () const
 Get the item pointed to by the iterator. More...
 
const Item * operator-> () const
 Get a pointer to the item pointed to by the itarator. More...
 

Public Attributes

const VectorView< Item > & parent
 
size_t offset = 0
 

Detailed Description

template<typename Item>
struct vg::VectorView< Item >::const_iterator

Random access iterator.

Member Typedef Documentation

◆ difference_type

template<typename Item >
using vg::VectorView< Item >::const_iterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename Item >
using vg::VectorView< Item >::const_iterator::iterator_category = std::random_access_iterator_tag

◆ pointer

template<typename Item >
using vg::VectorView< Item >::const_iterator::pointer = const Item*

◆ reference

template<typename Item >
using vg::VectorView< Item >::const_iterator::reference = const Item&

◆ value_type

template<typename Item >
using vg::VectorView< Item >::const_iterator::value_type = const Item

Member Function Documentation

◆ operator!=()

template<typename Item >
bool vg::VectorView< Item >::const_iterator::operator!= ( const const_iterator other) const
inline

Check if two iterators on the same container are not equal.

◆ operator*()

template<typename Item >
const Item& vg::VectorView< Item >::const_iterator::operator* ( ) const
inline

Get the item pointed to by the iterator.

◆ operator+()

template<typename Item >
const_iterator vg::VectorView< Item >::const_iterator::operator+ ( const difference_type difference) const
inline

Advance the iterator by a distance, copying.

◆ operator++() [1/2]

template<typename Item >
const_iterator& vg::VectorView< Item >::const_iterator::operator++ ( )
inline

Advance the iterator. Pre-increment.

◆ operator++() [2/2]

template<typename Item >
const_iterator vg::VectorView< Item >::const_iterator::operator++ ( int  )
inline

Advance the iterator. Post-increment.

◆ operator+=()

template<typename Item >
const_iterator& vg::VectorView< Item >::const_iterator::operator+= ( const difference_type difference)
inline

Advance the iterator by a distance, in place.

◆ operator-() [1/2]

template<typename Item >
difference_type vg::VectorView< Item >::const_iterator::operator- ( const const_iterator other) const
inline

Get a difference of iterators on the same container.

◆ operator-() [2/2]

template<typename Item >
const_iterator vg::VectorView< Item >::const_iterator::operator- ( const difference_type difference) const
inline

De-advance the iterator by a distance, copying.

◆ operator--() [1/2]

template<typename Item >
const_iterator& vg::VectorView< Item >::const_iterator::operator-- ( )
inline

De-advance the iterator. Pre-decrement.

◆ operator--() [2/2]

template<typename Item >
const_iterator vg::VectorView< Item >::const_iterator::operator-- ( int  )
inline

De-advance the iterator. Post-decrement.

◆ operator-=()

template<typename Item >
const_iterator& vg::VectorView< Item >::const_iterator::operator-= ( const difference_type difference)
inline

De-advance the iterator by a distance, in place.

◆ operator->()

template<typename Item >
const Item* vg::VectorView< Item >::const_iterator::operator-> ( ) const
inline

Get a pointer to the item pointed to by the itarator.

◆ operator==()

template<typename Item >
bool vg::VectorView< Item >::const_iterator::operator== ( const const_iterator other) const
inline

Check if two iterators on the same container are equal.

Member Data Documentation

◆ offset

template<typename Item >
size_t vg::VectorView< Item >::const_iterator::offset = 0

◆ parent

template<typename Item >
const VectorView<Item>& vg::VectorView< Item >::const_iterator::parent

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