NEST main@caf0ae8
 
Loading...
Searching...
No Matches
bv_iterator< value_type_, ref_, ptr_ > Class Template Reference

A BlockVector::iterator. More...

#include <block_vector.h>

Inheritance diagram for bv_iterator< value_type_, ref_, ptr_ >:
[legend]
Collaboration diagram for bv_iterator< value_type_, ref_, ptr_ >:
[legend]

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
 

Detailed Description

template<typename value_type_, typename ref_, typename ptr_>
class bv_iterator< value_type_, ref_, ptr_ >

A BlockVector::iterator.

Template Parameters
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.

Member Typedef Documentation

◆ const_iterator

template<typename value_type_ , typename ref_ , typename ptr_ >
using bv_iterator< value_type_, ref_, ptr_ >::const_iterator = iter_< const value_type_ >

◆ difference_type

template<typename value_type_ , typename ref_ , typename ptr_ >
using bv_iterator< value_type_, ref_, ptr_ >::difference_type = typename BlockVector< value_type >::difference_type

◆ iter_

template<typename value_type_ , typename ref_ , typename ptr_ >
template<typename cv_value_type_ >
using bv_iterator< value_type_, ref_, ptr_ >::iter_ = bv_iterator< value_type_, cv_value_type_&, cv_value_type_* >
private

◆ iterator

template<typename value_type_ , typename ref_ , typename ptr_ >
using bv_iterator< value_type_, ref_, ptr_ >::iterator = iter_< value_type_ >

◆ iterator_category

template<typename value_type_ , typename ref_ , typename ptr_ >
using bv_iterator< value_type_, ref_, ptr_ >::iterator_category = std::random_access_iterator_tag

◆ pointer

template<typename value_type_ , typename ref_ , typename ptr_ >
using bv_iterator< value_type_, ref_, ptr_ >::pointer = ptr_

◆ reference

template<typename value_type_ , typename ref_ , typename ptr_ >
using bv_iterator< value_type_, ref_, ptr_ >::reference = ref_

◆ value_type

template<typename value_type_ , typename ref_ , typename ptr_ >
using bv_iterator< value_type_, ref_, ptr_ >::value_type = value_type_

Constructor & Destructor Documentation

◆ bv_iterator() [1/4]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::bv_iterator ( )
inline

◆ bv_iterator() [2/4]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::bv_iterator ( const BlockVector< value_type_ > &  block_vector)
inlineexplicit

Creates an iterator pointing to the first element in a BlockVector.

Parameters
block_vectorBlockVector to which the iterator will point to.

◆ bv_iterator() [3/4]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::bv_iterator ( const iterator &  other)
inline

Iterator copy constructor.

Parameters
otherIterator to be copied.

◆ bv_iterator() [4/4]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::bv_iterator ( const BlockVector< value_type_ > *  block_vector,
const typename std::vector< std::vector< value_type_ > >::const_iterator  block_vector_it,
const typename std::vector< value_type_ >::const_iterator  block_it,
const typename std::vector< value_type_ >::const_iterator  current_block_end 
)
inline

Creates an iterator with specified parameters.

Parameters
block_vectorBlockVector to point to.
block_indexIndex of current block.
block_itIterator pointing to current element in the current block.
current_block_endIterator pointing to the end of the current block.

Member Function Documentation

◆ const_cast_()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::iterator bv_iterator< value_type_, ref_, ptr_ >::const_cast_ ( ) const
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().

Here is the caller graph for this function:

◆ operator!=()

template<typename value_type_ , typename ref_ , typename ptr_ >
bool bv_iterator< value_type_, ref_, ptr_ >::operator!= ( const bv_iterator< value_type_, ref_, ptr_ > &  rhs) const
inline

◆ operator*()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::reference bv_iterator< value_type_, ref_, ptr_ >::operator* ( ) const
inline

◆ operator+()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator+ ( difference_type  val) const
inline

◆ operator++() [1/2]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > & bv_iterator< value_type_, ref_, ptr_ >::operator++ ( )
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+=().

Here is the caller graph for this function:

◆ operator++() [2/2]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator++ ( int  )
inline

◆ operator+=()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > & bv_iterator< value_type_, ref_, ptr_ >::operator+= ( difference_type  val)
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-=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator-() [1/3]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::difference_type bv_iterator< value_type_, ref_, ptr_ >::operator- ( const const_iterator &  other) const
inline

◆ operator-() [2/3]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::difference_type bv_iterator< value_type_, ref_, ptr_ >::operator- ( const iterator &  other) const
inline

◆ operator-() [3/3]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator- ( difference_type  val) const
inline

◆ operator--() [1/2]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > & bv_iterator< value_type_, ref_, ptr_ >::operator-- ( )
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-=().

Here is the caller graph for this function:

◆ operator--() [2/2]

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > bv_iterator< value_type_, ref_, ptr_ >::operator-- ( int  )
inline

◆ operator-=()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ > & bv_iterator< value_type_, ref_, ptr_ >::operator-= ( difference_type  val)
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+=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator->()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::pointer bv_iterator< value_type_, ref_, ptr_ >::operator-> ( ) const
inline

◆ operator<()

template<typename value_type_ , typename ref_ , typename ptr_ >
bool bv_iterator< value_type_, ref_, ptr_ >::operator< ( const bv_iterator< value_type_, ref_, ptr_ > &  rhs) const
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<=().

Here is the caller graph for this function:

◆ operator<=()

template<typename value_type_ , typename ref_ , typename ptr_ >
bool bv_iterator< value_type_, ref_, ptr_ >::operator<= ( const bv_iterator< value_type_, ref_, ptr_ > &  rhs) const
inline

References bv_iterator< value_type_, ref_, ptr_ >::operator<(), and bv_iterator< value_type_, ref_, ptr_ >::operator==().

Here is the call graph for this function:

◆ operator=()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::iterator & bv_iterator< value_type_, ref_, ptr_ >::operator= ( const iterator &  other)
inline

◆ operator==()

template<typename value_type_ , typename ref_ , typename ptr_ >
bool bv_iterator< value_type_, ref_, ptr_ >::operator== ( const bv_iterator< value_type_, ref_, ptr_ > &  rhs) const
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>=().

Here is the caller graph for this function:

◆ operator>()

template<typename value_type_ , typename ref_ , typename ptr_ >
bool bv_iterator< value_type_, ref_, ptr_ >::operator> ( const bv_iterator< value_type_, ref_, ptr_ > &  rhs) const
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>=().

Here is the caller graph for this function:

◆ operator>=()

template<typename value_type_ , typename ref_ , typename ptr_ >
bool bv_iterator< value_type_, ref_, ptr_ >::operator>= ( const bv_iterator< value_type_, ref_, ptr_ > &  rhs) const
inline

References bv_iterator< value_type_, ref_, ptr_ >::operator==(), and bv_iterator< value_type_, ref_, ptr_ >::operator>().

Here is the call graph for this function:

◆ operator[]()

template<typename value_type_ , typename ref_ , typename ptr_ >
bv_iterator< value_type_, ref_, ptr_ >::reference bv_iterator< value_type_, ref_, ptr_ >::operator[] ( difference_type  n) const
inline

Friends And Related Symbol Documentation

◆ BlockVector< value_type_ >

template<typename value_type_ , typename ref_ , typename ptr_ >
friend class BlockVector< value_type_ >
friend

◆ bv_iterator

template<typename value_type_ , typename ref_ , typename ptr_ >
template<typename , typename , typename >
friend class bv_iterator
friend

Member Data Documentation

◆ block_it_

◆ block_vector_

◆ block_vector_it_

◆ current_block_end_

template<typename value_type_ , typename ref_ , typename ptr_ >
std::vector<value_type_>::const_iterator bv_iterator< value_type_, ref_, ptr_ >::current_block_end_
private

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