A BlockVector::iterator. More...
#include <block_vector.h>
Public Types | |
| using | iterator = iter_< value_type_ > |
| using | const_iterator = iter_< const value_type_ > |
| using | iterator_category = std::random_access_iterator_tag |
| using | value_type = value_type_ |
| using | pointer = ptr_ |
| using | reference = ref_ |
| using | difference_type = typename BlockVector< value_type >::difference_type |
Public Member Functions | |
| bv_iterator () | |
| bv_iterator (const BlockVector< value_type_ > &) | |
| Creates an iterator pointing to the first element in a BlockVector. | |
| bv_iterator (const iterator &) | |
| Iterator copy constructor. | |
| bv_iterator (const BlockVector< value_type_ > *, const typename std::vector< std::vector< value_type_ > >::const_iterator, const typename std::vector< value_type_ >::const_iterator, const typename std::vector< value_type_ >::const_iterator) | |
| Creates an iterator with specified parameters. | |
| bv_iterator & | operator++ () |
| bv_iterator & | operator-- () |
| bv_iterator & | operator+= (difference_type) |
| bv_iterator & | operator-= (difference_type) |
| bv_iterator | operator+ (difference_type) const |
| bv_iterator | operator- (difference_type) const |
| bv_iterator | operator++ (int) |
| bv_iterator | operator-- (int) |
| reference | operator* () const |
| pointer | operator-> () const |
| difference_type | operator- (const iterator &) const |
| difference_type | operator- (const const_iterator &) const |
| iterator & | operator= (const iterator &) |
| reference | operator[] (difference_type n) const |
| bool | operator== (const bv_iterator &) const |
| bool | operator!= (const bv_iterator &) const |
| bool | operator< (const bv_iterator &) const |
| bool | operator> (const bv_iterator &) const |
| bool | operator<= (const bv_iterator &) const |
| bool | operator>= (const bv_iterator &) const |
Private Types | |
| template<typename cv_value_type_ > | |
| using | iter_ = bv_iterator< value_type_, cv_value_type_ &, cv_value_type_ * > |
Private Member Functions | |
| iterator | const_cast_ () const |
| Converts the iterator to a non-const iterator. | |
Private Attributes | |
| const BlockVector< value_type_ > * | block_vector_ |
| BlockVector to which this iterator points. | |
| std::vector< std::vector< value_type_ > >::const_iterator | block_vector_it_ |
| Iterator for the current block in the blockmap. | |
| std::vector< value_type_ >::const_iterator | block_it_ |
| Iterator pointing to the current element in the current block. | |
| std::vector< value_type_ >::const_iterator | current_block_end_ |
| Iterator pointing to the end of the current block. | |
Friends | |
| class | BlockVector< value_type_ > |
| template<typename , typename , typename > | |
| class | bv_iterator |
| value_type_ | Type of element. |
| ref_ | Type of reference to the element. |
| ptr_ | Type of pointer to the element. |
BlockVector holds one of this internally, marking the end of the valid range.
| using bv_iterator< value_type_, ref_, ptr_ >::const_iterator = iter_< const value_type_ > |
| using bv_iterator< value_type_, ref_, ptr_ >::difference_type = typename BlockVector< value_type >::difference_type |
|
private |
| using bv_iterator< value_type_, ref_, ptr_ >::iterator = iter_< value_type_ > |
| using bv_iterator< value_type_, ref_, ptr_ >::iterator_category = std::random_access_iterator_tag |
| using bv_iterator< value_type_, ref_, ptr_ >::pointer = ptr_ |
| using bv_iterator< value_type_, ref_, ptr_ >::reference = ref_ |
| using bv_iterator< value_type_, ref_, ptr_ >::value_type = value_type_ |
|
inline |
|
inlineexplicit |
Creates an iterator pointing to the first element in a BlockVector.
| block_vector | BlockVector to which the iterator will point to. |
|
inline |
Iterator copy constructor.
| other | Iterator to be copied. |
|
inline |
Creates an iterator with specified parameters.
| block_vector | BlockVector to point to. |
| block_index | Index of current block. |
| block_it | Iterator pointing to current element in the current block. |
| current_block_end | Iterator pointing to the end of the current block. |
|
inlineprivate |
Converts the iterator to a non-const iterator.
References bv_iterator< value_type_, ref_, ptr_ >::block_it_, bv_iterator< value_type_, ref_, ptr_ >::block_vector_, bv_iterator< value_type_, ref_, ptr_ >::block_vector_it_, and bv_iterator< value_type_, ref_, ptr_ >::current_block_end_.
Referenced by BlockVector< value_type_ >::erase().
|
inline |
|
inline |
|
inline |
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::block_it_, bv_iterator< value_type_, ref_, ptr_ >::block_vector_, bv_iterator< value_type_, ref_, ptr_ >::block_vector_it_, and bv_iterator< value_type_, ref_, ptr_ >::current_block_end_.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::operator+=().
|
inline |
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::operator++(), and bv_iterator< value_type_, ref_, ptr_ >::operator-=().
Referenced by bv_iterator< value_type_, ref_, ptr_ >::operator-=().
|
inline |
|
inline |
|
inline |
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::block_it_, bv_iterator< value_type_, ref_, ptr_ >::block_vector_, bv_iterator< value_type_, ref_, ptr_ >::block_vector_it_, and bv_iterator< value_type_, ref_, ptr_ >::current_block_end_.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::operator-=().
|
inline |
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::operator+=(), and bv_iterator< value_type_, ref_, ptr_ >::operator--().
Referenced by bv_iterator< value_type_, ref_, ptr_ >::operator+=().
|
inline |
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::block_it_, and bv_iterator< value_type_, ref_, ptr_ >::block_vector_it_.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::operator<=().
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::operator<(), and bv_iterator< value_type_, ref_, ptr_ >::operator==().
|
inline |
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::block_it_, and bv_iterator< value_type_, ref_, ptr_ >::block_vector_it_.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::operator<=(), and bv_iterator< value_type_, ref_, ptr_ >::operator>=().
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::block_it_, and bv_iterator< value_type_, ref_, ptr_ >::block_vector_it_.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::operator>=().
|
inline |
References bv_iterator< value_type_, ref_, ptr_ >::operator==(), and bv_iterator< value_type_, ref_, ptr_ >::operator>().
|
inline |
|
friend |
|
friend |
|
private |
Iterator pointing to the current element in the current block.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::const_cast_(), bv_iterator< value_type_, ref_, ptr_ >::operator!=(), bv_iterator< value_type_, ref_, ptr_ >::operator++(), bv_iterator< value_type_, ref_, ptr_ >::operator-(), bv_iterator< value_type_, ref_, ptr_ >::operator-(), bv_iterator< value_type_, ref_, ptr_ >::operator--(), bv_iterator< value_type_, ref_, ptr_ >::operator<(), bv_iterator< value_type_, ref_, ptr_ >::operator=(), bv_iterator< value_type_, ref_, ptr_ >::operator==(), and bv_iterator< value_type_, ref_, ptr_ >::operator>().
|
private |
BlockVector to which this iterator points.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::const_cast_(), BlockVector< value_type_ >::erase(), bv_iterator< value_type_, ref_, ptr_ >::operator++(), bv_iterator< value_type_, ref_, ptr_ >::operator--(), bv_iterator< value_type_, ref_, ptr_ >::operator=(), BlockVector< value_type_ >::print_blocks(), and BlockVector< value_type_ >::push_back().
|
private |
Iterator for the current block in the blockmap.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::const_cast_(), bv_iterator< value_type_, ref_, ptr_ >::operator!=(), bv_iterator< value_type_, ref_, ptr_ >::operator++(), bv_iterator< value_type_, ref_, ptr_ >::operator-(), bv_iterator< value_type_, ref_, ptr_ >::operator-(), bv_iterator< value_type_, ref_, ptr_ >::operator--(), bv_iterator< value_type_, ref_, ptr_ >::operator<(), bv_iterator< value_type_, ref_, ptr_ >::operator=(), bv_iterator< value_type_, ref_, ptr_ >::operator==(), bv_iterator< value_type_, ref_, ptr_ >::operator>(), and BlockVector< value_type_ >::push_back().
|
private |
Iterator pointing to the end of the current block.
Referenced by bv_iterator< value_type_, ref_, ptr_ >::const_cast_(), bv_iterator< value_type_, ref_, ptr_ >::operator++(), bv_iterator< value_type_, ref_, ptr_ >::operator--(), and bv_iterator< value_type_, ref_, ptr_ >::operator=().