|
dune-common 2.12-git
|
Specialization for pointer types. More...
#include <dune/common/indexediterator.hh>

Public Types | |
| using | reference = typename Facade::reference |
| using | difference_type = typename Facade::difference_type |
| using | iterator_type = T * |
| using | iterator_category = std::random_access_iterator_tag |
| using | value_type = typename std::remove_const< T >::type |
| using | pointer = T * |
| using | Value = value_type |
| using | Reference = reference |
| using | Pointer = pointer |
| using | DifferenceType = difference_type |
Public Member Functions | |
| constexpr | IndexedIterator (T *ptr, difference_type index=0) |
| Construct an IndexedIterator from a pointer and an index. | |
| constexpr reference | operator* () const |
| Dereference the pointer. | |
| constexpr IndexedIterator & | operator+= (typename Facade::difference_type d) |
| Increment the iterator and the index. | |
| constexpr difference_type | index () const noexcept |
| Return the enumeration index. | |
| constexpr pointer | operator-> () const |
| Arrow access to members of referenced value. | |
| constexpr decltype(auto) | operator++ () |
| Preincrement operator. | |
| constexpr DerivedIterator | operator++ (int) |
| Postincrement operator. | |
| constexpr decltype(auto) | operator-- () |
| Predecrement operator. | |
| constexpr DerivedIterator | operator-- (int) |
| Postdecrement operator. | |
| constexpr reference | operator[] (difference_type n) const |
| Dereference element with given offset form this iterator. | |
| constexpr DerivedIterator | operator+ (difference_type n) const |
| Create iterator incremented by given value. | |
| constexpr DerivedIterator & | operator-= (difference_type n) |
| Decrement iterator by given value. | |
| constexpr DerivedIterator | operator- (difference_type n) const |
| Create iterator decremented by given value. | |
Protected Types | |
| using | DerivedIterator = IndexedIterator< T * > |
| The derived iterator type. | |
Protected Member Functions | |
| constexpr const DerivedIterator & | derived () const |
Cast of *this to const DerivedIterator type. | |
| constexpr DerivedIterator & | derived () |
Cast of *this to DerivedIterator type. | |
Friends | |
| constexpr difference_type | operator- (const IndexedIterator &it1, const IndexedIterator &it2) |
| Decrement the iterator and the index. | |
| constexpr bool | operator== (const IndexedIterator &it1, const IndexedIterator &it2) |
| Compare two iterators for equality: compares the underlying ptrs. | |
Detailed Description
class Dune::IndexedIterator< T * >
Specialization for pointer types.
Member Typedef Documentation
◆ DerivedIterator
|
protectedinherited |
The derived iterator type.
◆ difference_type
| using Dune::IndexedIterator< T * >::difference_type = typename Facade::difference_type |
◆ DifferenceType
|
inherited |
◆ iterator_category
|
inherited |
◆ iterator_type
| using Dune::IndexedIterator< T * >::iterator_type = T* |
◆ pointer
|
inherited |
◆ Pointer
|
inherited |
◆ reference
| using Dune::IndexedIterator< T * >::reference = typename Facade::reference |
◆ Reference
|
inherited |
◆ Value
|
inherited |
◆ value_type
|
inherited |
Constructor & Destructor Documentation
◆ IndexedIterator()
|
inlineexplicitconstexpr |
Construct an IndexedIterator from a pointer and an index.
Member Function Documentation
◆ derived() [1/2]
|
inlineconstexprprotectedinherited |
Cast of *this to DerivedIterator type.
◆ derived() [2/2]
|
inlineconstexprprotectedinherited |
Cast of *this to const DerivedIterator type.
◆ index()
|
inlineconstexprnoexcept |
Return the enumeration index.
◆ operator*()
|
inlineconstexpr |
Dereference the pointer.
◆ operator+()
|
inlineconstexprinherited |
Create iterator incremented by given value.
Only enabled for random-access iterators.
◆ operator++() [1/2]
|
inlineconstexprinherited |
Preincrement operator.
◆ operator++() [2/2]
|
inlineconstexprinherited |
Postincrement operator.
◆ operator+=()
|
inlineconstexpr |
Increment the iterator and the index.
◆ operator-()
|
inlineconstexprinherited |
Create iterator decremented by given value.
Only enabled for random-access iterators.
◆ operator--() [1/2]
|
inlineconstexprinherited |
Predecrement operator.
Only enabled for bidirectional and random-access iterators.
◆ operator--() [2/2]
|
inlineconstexprinherited |
Postdecrement operator.
Only enabled for bidirectional and random-access iterators.
◆ operator-=()
|
inlineconstexprinherited |
Decrement iterator by given value.
Only enabled for random-access iterators.
◆ operator->()
|
inlineconstexprinherited |
Arrow access to members of referenced value.
◆ operator[]()
|
inlineconstexprinherited |
Dereference element with given offset form this iterator.
- Parameters
-
n The distance to the element.
- Returns
- The element at that distance.
Only enabled for random-access iterators.
Friends And Related Symbol Documentation
◆ operator-
|
friend |
Decrement the iterator and the index.
◆ operator==
|
friend |
Compare two iterators for equality: compares the underlying ptrs.
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8