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)
hxflat_map_value_t< key_t_, mapped_t_ > operator* (void) const
iterator & operator+= (hxsize_t n_)
iterator & operator-= (hxsize_t n_)
iterator operator+ (hxsize_t n_) const
iterator operator- (hxsize_t n_) const
hxsize_t operator- (const const_iterator &x_) const
hxflat_map_value_t< key_t_, mapped_t_ > operator[] (hxsize_t n_) const
iterator & operator++ (void)
iterator operator++ (int)
iterator & operator-- (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)
hxflat_map_const_value_t< key_t_, mapped_t_ > operator* (void) const
const_iterator & operator+= (hxsize_t n_)
const_iterator & operator-= (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
hxflat_map_const_value_t< key_t_, mapped_t_ > operator[] (hxsize_t n_) const
const_iterator & operator++ (void)
const_iterator operator++ (int)
const_iterator & operator-- (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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
hxflat_map_value_t< key_t_, mapped_t_ > hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator* ( void ) const
inline

Returns a hxflat_map_value_t proxy referencing the key and value at the current position, allowing mutation of the value.

◆ operator+()

template<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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<hxflat_map_concept_ key_t_, hxflat_map_concept_ mapped_t_, typename compare_t_ = hxkey_less_t<key_t_>, bool multi_t_ = true, hxsize_t capacity_ = hxallocator_dynamic_capacity>
hxflat_map_value_t< key_t_, mapped_t_ > hxflat_map< key_t_, mapped_t_, compare_t_, multi_t_, capacity_ >::iterator::operator[] ( hxsize_t n_) const
inline

Returns a hxflat_map_value_t proxy referencing the key and value n positions ahead of this one.

  • n : The offset from this position.

◆ value()

template<hxflat_map_concept_ key_t_, hxflat_map_concept_ 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: