deal.II version GIT relicensing-2206-gaa53ff9447 2024-12-02 09:10:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
IteratorOverIterators< Iterator > Class Template Reference

#include <deal.II/base/iterator_range.h>

Public Types

using BaseIterator = Iterator
 
using iterator_category = std::forward_iterator_tag
 
using value_type = Iterator
 
using difference_type = typename Iterator::difference_type
 
using pointer = Iterator *
 
using reference = Iterator &
 

Public Member Functions

 IteratorOverIterators (const BaseIterator &iterator)
 
const BaseIteratoroperator* () const
 
const BaseIteratoroperator-> () const
 
IteratorOverIteratorsoperator++ ()
 
IteratorOverIterators operator++ (int)
 
bool operator!= (const IteratorOverIterators &i_o_i) const
 
 operator const BaseIterator & () const
 

Private Attributes

BaseIterator element_of_iterator_collection
 

Detailed Description

template<typename Iterator>
class IteratorOverIterators< Iterator >

A class that implements the semantics of iterators over iterators as discussed in the design sections of the IteratorRange class.

Definition at line 196 of file iterator_range.h.

Member Typedef Documentation

◆ BaseIterator

template<typename Iterator >
using IteratorOverIterators< Iterator >::BaseIterator = Iterator

Typedef the elements of the collection to give them a name that is more distinct.

Definition at line 203 of file iterator_range.h.

◆ iterator_category

template<typename Iterator >
using IteratorOverIterators< Iterator >::iterator_category = std::forward_iterator_tag

Mark the class as forward iterator and declare some alias which are standard for iterators and are used by algorithms to enquire about the specifics of the iterators they work on.

Definition at line 271 of file iterator_range.h.

◆ value_type

template<typename Iterator >
using IteratorOverIterators< Iterator >::value_type = Iterator

Definition at line 272 of file iterator_range.h.

◆ difference_type

template<typename Iterator >
using IteratorOverIterators< Iterator >::difference_type = typename Iterator::difference_type

Definition at line 273 of file iterator_range.h.

◆ pointer

template<typename Iterator >
using IteratorOverIterators< Iterator >::pointer = Iterator *

Definition at line 274 of file iterator_range.h.

◆ reference

template<typename Iterator >
using IteratorOverIterators< Iterator >::reference = Iterator &

Definition at line 275 of file iterator_range.h.

Constructor & Destructor Documentation

◆ IteratorOverIterators()

template<typename Iterator >
IteratorOverIterators< Iterator >::IteratorOverIterators ( const BaseIterator iterator)
inlineexplicit

Constructor. Initialize this iterator-over-iterator in such a way that it points to the given argument.

Parameters
iteratorAn iterator to which this object is supposed to point.

Definition at line 304 of file iterator_range.h.

Member Function Documentation

◆ operator*()

template<typename Iterator >
const IteratorOverIterators< Iterator >::BaseIterator & IteratorOverIterators< Iterator >::operator* ( ) const
inline

Dereferencing operator.

Returns
The iterator within the collection currently pointed to.

Definition at line 313 of file iterator_range.h.

◆ operator->()

template<typename Iterator >
const IteratorOverIterators< Iterator >::BaseIterator * IteratorOverIterators< Iterator >::operator-> ( ) const
inline

Dereferencing operator.

Returns
The iterator within the collection currently pointed to.

Definition at line 322 of file iterator_range.h.

◆ operator++() [1/2]

template<typename Iterator >
IteratorOverIterators< Iterator > & IteratorOverIterators< Iterator >::operator++ ( )
inline

Prefix increment operator. Move the current iterator to the next element of the collection and return the new value.

Definition at line 331 of file iterator_range.h.

◆ operator++() [2/2]

template<typename Iterator >
IteratorOverIterators< Iterator > IteratorOverIterators< Iterator >::operator++ ( int  )
inline

Postfix increment operator. Move the current iterator to the next element of the collection, but return the previous value of the iterator.

Definition at line 341 of file iterator_range.h.

◆ operator!=()

template<typename Iterator >
bool IteratorOverIterators< Iterator >::operator!= ( const IteratorOverIterators< Iterator > &  i_o_i) const
inline

Comparison operator

Parameters
i_o_iAnother iterator over iterators.
Returns
Returns whether the current iterator points to a different object than the iterator represented by the argument.

Definition at line 352 of file iterator_range.h.

◆ operator const BaseIterator &()

template<typename Iterator >
IteratorOverIterators< Iterator >::operator const BaseIterator & ( ) const
inline

Implicit conversion operator.

Warning
When you call this conversion operator (i.e., you convert this iterator-over-iterators to the iterator we are currently pointing to), you obtain a const reference to this underlying iterator. The only thing you can really do with this result is dereferencing itself: it presumably points to something useful, but since you don't know where the pointed to object lives, you shouldn't increment or decrement the iterator you get from this operator. As a consequence, the returned iterator is marked as const, as this should prevent you from doing anything other than dereference it.

Definition at line 361 of file iterator_range.h.

Member Data Documentation

◆ element_of_iterator_collection

template<typename Iterator >
BaseIterator IteratorOverIterators< Iterator >::element_of_iterator_collection
private

The object this iterator currently points to.

Definition at line 281 of file iterator_range.h.


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