libhatchet
Loading...
Searching...
No Matches
hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator Class Reference

#include <hxflat_map.hpp>

Public Member Functions

 iterator (void)
const iteratoroperator* (void) const
iteratoroperator+= (hxsize_t n_)
iteratoroperator-= (hxsize_t n_)
iterator operator+ (hxsize_t n_) const
iterator operator- (hxsize_t n_) const
hxsize_t operator- (const const_iterator &x_) const
iterator operator[] (hxsize_t n_) const
iteratoroperator++ (void)
iterator operator++ (int)
iteratoroperator-- (void)
iterator operator-- (int)
mapped_t_ & value (void) const
Public Member Functions inherited from hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::const_iterator
 const_iterator (void)
const const_iteratoroperator* (void) const
const_iteratoroperator+= (hxsize_t n_)
const_iteratoroperator-= (hxsize_t n_)
const_iterator operator+ (hxsize_t n_) const
const_iterator operator- (hxsize_t n_) const
hxsize_t operator- (const const_iterator &x_) const
const_iterator operator[] (hxsize_t n_) const
const_iteratoroperator++ (void)
const_iterator operator++ (int)
const_iteratoroperator-- (void)
const_iterator operator-- (int)
bool operator== (const const_iterator &x_) const
bool operator< (const const_iterator &x_) const
bool operator> (const const_iterator &x_) const
bool operator<= (const const_iterator &x_) const
bool operator>= (const const_iterator &x_) const
const key_t_ & key (void) const
const mapped_t_ & value (void) const

Detailed Description

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
class hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator

iterator - A mutable random-access iterator that allows modifying the mapped value.

Constructor & Destructor Documentation

◆ iterator()

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::iterator ( void )
inline

Constructs an end iterator.

Member Function Documentation

◆ operator*()

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
const iterator & hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator* ( void ) const
inline

Returns a const reference to this iterator as a proxy element.

Access key and value via key() and value(). This is non-standard.

◆ operator+()

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator+ ( hxsize_t n_) const
inline

Returns an iterator advanced by n positions.

  • n : The number of positions to advance.

◆ operator++() [1/2]

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator++ ( int )
inline

Advances the iterator to the next element (post-increment).

◆ operator++() [2/2]

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator & hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator++ ( void )
inline

Advances the iterator to the next element.

◆ operator+=()

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator & hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator+= ( hxsize_t n_)
inline

Advances the iterator by n positions.

  • n : The number of positions to advance.

◆ operator-() [1/2]

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
hxsize_t hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator- ( const const_iterator & x_) const
inline

Returns the signed distance from x to this position.

  • x : The iterator to subtract.

◆ operator-() [2/2]

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator- ( hxsize_t n_) const
inline

Returns an iterator retreated by n positions.

  • n : The number of positions to retreat.

◆ operator--() [1/2]

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator-- ( int )
inline

Retreats the iterator to the previous element (post-decrement).

◆ operator--() [2/2]

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator & hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator-- ( void )
inline

Retreats the iterator to the previous element.

◆ operator-=()

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator & hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator-= ( hxsize_t n_)
inline

Moves the iterator back by n positions.

  • n : The number of positions to retreat.

◆ operator[]()

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
iterator hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator[] ( hxsize_t n_) const
inline

Returns a copy of the iterator offset by n positions.

  • n : The offset from this position.

◆ value()

template<typename key_t_, typename mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
mapped_t_ & hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::value ( void ) const

Returns the mapped value at the current position, allowing mutation.

This is simple so the compiler errors are simple.


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