Inviwo
0.9.10.1
Inviwo documentation
|
#include <indirectiterator.h>
Public Types | |
using | difference_type = typename std::iterator_traits< Iter >::difference_type |
using | iterator_category = typename std::iterator_traits< Iter >::iterator_category |
using | base_value = typename std::iterator_traits< Iter >::value_type |
using | value_type = decltype(*std::declval< base_value >()) |
using | base_pointer = typename std::iterator_traits< Iter >::pointer |
using | pointer = decltype(detail_indirect::asPointer< is_const >::get(*std::declval< base_pointer >())) |
using | base_reference = typename std::iterator_traits< Iter >::reference |
using | reference = std::conditional_t< is_const, detail_indirect::add_const_to_reference_t< decltype(*std::declval< base_reference >())>, decltype(*std::declval< base_reference >())> |
template<typename Tag , typename Iterables > | |
using | require_t = detail_indirect::require_t< Tag, Iter > |
Public Member Functions | |
IndirectIterator (Iter iterator) | |
IndirectIterator & | operator++ () |
IndirectIterator | operator++ (int) |
template<typename I = Iter, typename = require_t<std::bidirectional_iterator_tag, I>> | |
IndirectIterator & | operator-- () |
template<typename I = Iter, typename = require_t<std::bidirectional_iterator_tag, I>> | |
IndirectIterator | operator-- (int) |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
IndirectIterator & | operator+= (difference_type rhs) |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
IndirectIterator & | operator-= (difference_type rhs) |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
difference_type | operator- (const IndirectIterator &rhs) const |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
IndirectIterator | operator+ (difference_type i) const |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
IndirectIterator | operator- (difference_type i) const |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
reference | operator[] (difference_type i) const |
reference | operator * () const |
pointer | operator-> () const |
const Iter & | base () const |
Iter & | base () |
bool | operator== (const IndirectIterator &rhs) const |
bool | operator!= (const IndirectIterator &rhs) const |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
bool | operator> (const IndirectIterator &rhs) const |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
bool | operator< (const IndirectIterator &rhs) const |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
bool | operator>= (const IndirectIterator &rhs) const |
template<typename I = Iter, typename = require_t<std::random_access_iterator_tag, I>> | |
bool | operator<= (const IndirectIterator &rhs) const |
Static Public Attributes | |
static constexpr bool | is_const |
IndirectIterator<typename Iter, bool PropagateConst = true> Iter is underlying iterator to a pointer like type PropagateConst decides if we should treat the value as const if the pointer is const.
Example:
The use case is to container types that stores items using a vector of pointers, but want to expose an iterator directly to the item not to the pointer.
|
static |