OGS
BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element > Struct Template Reference

Detailed Description

template<typename Element>
struct BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >

Definition at line 25 of file ContainerTools.h.

#include <ContainerTools.h>

Public Types

using value_type = Element
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 PolymorphicRandomAccessContainerViewIterator ()=default
 
 PolymorphicRandomAccessContainerViewIterator (std::size_t n, PolymorphicRandomAccessContainerViewInterface< Element > const *const view) noexcept
 
PolymorphicRandomAccessContainerViewIteratoroperator++ () noexcept
 
PolymorphicRandomAccessContainerViewIterator operator++ (int) noexcept
 
PolymorphicRandomAccessContainerViewIteratoroperator-- () noexcept
 
PolymorphicRandomAccessContainerViewIterator operator-- (int) noexcept
 
PolymorphicRandomAccessContainerViewIteratoroperator+= (difference_type const increment) noexcept
 
PolymorphicRandomAccessContainerViewIteratoroperator-= (difference_type const decrement) noexcept
 
difference_type operator- (PolymorphicRandomAccessContainerViewIterator const other) const noexcept
 
Element & operator* () const
 
Element & operator[] (difference_type n) const
 
auto operator<=> (PolymorphicRandomAccessContainerViewIterator const &) const =default
 

Private Attributes

std::size_t n_ = 0
 
PolymorphicRandomAccessContainerViewInterface< Element > const * view_
 

Friends

PolymorphicRandomAccessContainerViewIterator operator+ (PolymorphicRandomAccessContainerViewIterator iterator, difference_type const increment) noexcept
 
PolymorphicRandomAccessContainerViewIterator operator+ (difference_type const increment, PolymorphicRandomAccessContainerViewIterator iterator) noexcept
 
PolymorphicRandomAccessContainerViewIterator operator- (PolymorphicRandomAccessContainerViewIterator iterator, difference_type const decrement) noexcept
 

Member Typedef Documentation

◆ difference_type

template<typename Element >
using BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::difference_type = std::ptrdiff_t

Definition at line 28 of file ContainerTools.h.

◆ value_type

template<typename Element >
using BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::value_type = Element

Definition at line 27 of file ContainerTools.h.

Constructor & Destructor Documentation

◆ PolymorphicRandomAccessContainerViewIterator() [1/2]

template<typename Element >
BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::PolymorphicRandomAccessContainerViewIterator ( )
default

◆ PolymorphicRandomAccessContainerViewIterator() [2/2]

template<typename Element >
BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::PolymorphicRandomAccessContainerViewIterator ( std::size_t n,
PolymorphicRandomAccessContainerViewInterface< Element > const *const view )
inlinenoexcept

Definition at line 32 of file ContainerTools.h.

36 : n_{n}, view_{view}
37 {
38 }
PolymorphicRandomAccessContainerViewInterface< Element > const * view_

Member Function Documentation

◆ operator*()

◆ operator++() [1/2]

◆ operator++() [2/2]

template<typename Element >
PolymorphicRandomAccessContainerViewIterator BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator++ ( int )
inlinenoexcept

Definition at line 45 of file ContainerTools.h.

46 {
47 auto copy{*this};
48 operator++();
49 return copy;
50 }
void copy(PETScVector const &x, PETScVector &y)
Definition LinAlg.cpp:37
PolymorphicRandomAccessContainerViewIterator & operator++() noexcept

References BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator++().

◆ operator+=()

template<typename Element >
PolymorphicRandomAccessContainerViewIterator & BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator+= ( difference_type const increment)
inlinenoexcept

Definition at line 64 of file ContainerTools.h.

66 {
67 n_ += increment;
68 return *this;
69 }

References BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::n_.

◆ operator-()

template<typename Element >
difference_type BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator- ( PolymorphicRandomAccessContainerViewIterator< Element > const other) const
inlinenoexcept

◆ operator--() [1/2]

◆ operator--() [2/2]

template<typename Element >
PolymorphicRandomAccessContainerViewIterator BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator-- ( int )
inlinenoexcept

Definition at line 57 of file ContainerTools.h.

58 {
59 auto copy{*this};
60 operator--();
61 return copy;
62 }
PolymorphicRandomAccessContainerViewIterator & operator--() noexcept

References BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator--().

◆ operator-=()

template<typename Element >
PolymorphicRandomAccessContainerViewIterator & BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator-= ( difference_type const decrement)
inlinenoexcept

Definition at line 70 of file ContainerTools.h.

72 {
73 n_ -= decrement;
74 return *this;
75 }

References BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::n_.

◆ operator<=>()

template<typename Element >
auto BaseLib::detail::PolymorphicRandomAccessContainerViewIterator< Element >::operator<=> ( PolymorphicRandomAccessContainerViewIterator< Element > const & ) const
default

◆ operator[]()

Friends And Related Symbol Documentation

◆ operator+ [1/2]

template<typename Element >
PolymorphicRandomAccessContainerViewIterator operator+ ( difference_type const increment,
PolymorphicRandomAccessContainerViewIterator< Element > iterator )
friend

Definition at line 85 of file ContainerTools.h.

88 {
89 iterator.n_ += increment;
90 return iterator;
91 }

◆ operator+ [2/2]

template<typename Element >
PolymorphicRandomAccessContainerViewIterator operator+ ( PolymorphicRandomAccessContainerViewIterator< Element > iterator,
difference_type const increment )
friend

Definition at line 77 of file ContainerTools.h.

80 {
81 iterator.n_ += increment;
82 return iterator;
83 }

◆ operator-

template<typename Element >
PolymorphicRandomAccessContainerViewIterator operator- ( PolymorphicRandomAccessContainerViewIterator< Element > iterator,
difference_type const decrement )
friend

Definition at line 100 of file ContainerTools.h.

103 {
104 iterator.n_ -= decrement;
105 return iterator;
106 }

Member Data Documentation

◆ n_

◆ view_


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