Dune Core Modules (2.9.0)
Iterator facades for writing stl conformant iterators. More...
Modules | |
GenericIterator | |
Generic Iterator class for writing stl conformant iterators for any container class with operator[]. | |
Classes | |
class | Dune::ForwardIteratorFacade< T, V, R, D > |
Base class for stl conformant forward iterators. More... | |
class | Dune::BidirectionalIteratorFacade< T, V, R, D > |
Facade class for stl conformant bidirectional iterators. More... | |
class | Dune::RandomAccessIteratorFacade< T, V, R, D > |
Base class for stl conformant forward iterators. More... | |
Functions | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator== (const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs) |
Checks for equality. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator!= (const ForwardIteratorFacade< T1, V1, R1, D > &lhs, const ForwardIteratorFacade< T2, V2, R2, D > &rhs) |
Checks for inequality. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
std::enable_if< std::is_convertible< T2, T1 >::value, bool >::type | Dune::operator== (const BidirectionalIteratorFacade< T1, V1, R1, D > &lhs, const BidirectionalIteratorFacade< T2, V2, R2, D > &rhs) |
Checks for equality. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator!= (const BidirectionalIteratorFacade< T1, V1, R1, D > &lhs, const BidirectionalIteratorFacade< T2, V2, R2, D > &rhs) |
Checks for inequality. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator== (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs) |
Checks for equality. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator!= (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs) |
Checks for inequality. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator< (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs) |
Comparison operator. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator<= (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs) |
Comparison operator. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator> (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs) |
Comparison operator. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, bool >::type | Dune::operator>= (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs) |
Comparison operator. More... | |
template<class T1 , class V1 , class R1 , class D , class T2 , class V2 , class R2 > | |
EnableIfInterOperable< T1, T2, D >::type | Dune::operator- (const RandomAccessIteratorFacade< T1, V1, R1, D > &lhs, const RandomAccessIteratorFacade< T2, V2, R2, D > &rhs) |
Calculates the difference between two pointers. More... | |
Detailed Description
Iterator facades for writing stl conformant iterators.
With using these facades writing iterators for arbitrary containers becomes much less cumbersome as only few functions have to be implemented. All other functions needed by the stl are provided by the facades using the Barton-Nackman trick (also known as curiously recurring template pattern).
The following example illustrates how a random access iterator might be written:
See dune/common/test/iteratorbase.hh for details.
Function Documentation
◆ operator!=() [1/3]
|
inline |
Checks for inequality.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
◆ operator!=() [2/3]
|
inline |
Checks for inequality.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
References Dune::Hybrid::equals().
◆ operator!=() [3/3]
|
inline |
Checks for inequality.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
References Dune::Hybrid::equals().
◆ operator-()
|
inline |
Calculates the difference between two pointers.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
◆ operator<()
|
inline |
Comparison operator.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
◆ operator<=()
|
inline |
Comparison operator.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
◆ operator==() [1/3]
|
inline |
Checks for equality.
This operation is only defined if T2 is convertible to T1, otherwise it is removed from the overload set since the enable_if for the return type yield an invalid type expression.
References Dune::Hybrid::equals().
◆ operator==() [2/3]
|
inline |
Checks for equality.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
References Dune::Hybrid::equals().
◆ operator==() [3/3]
|
inline |
Checks for equality.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
References Dune::Hybrid::equals().
◆ operator>()
|
inline |
Comparison operator.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.
◆ operator>=()
|
inline |
Comparison operator.
This operation is only defined if either D2 is convertible to D1 or vice versa. If that is not the case the compiler will report an error as EnableIfInterOperable<D1,D2,bool>::type is not defined.