LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Base class for dereferencing iterators. More...
#include "DereferenceIterator.h"
Classes | |
struct | initialize_tag |
Tag used for initialization. More... | |
Public Types | |
Type definitions for standard iterators | |
using | difference_type = typename iterator_t::difference_type |
using | value_type = Value |
using | pointer = std::add_pointer_t< value_type > |
using | reference = std::add_lvalue_reference_t< value_type > |
using | iterator_category = typename iterator_t::iterator_category |
Public Member Functions | |
DereferenceIteratorBase ()=default | |
Default constructor. More... | |
DereferenceIteratorBase (Iter const &iter, initialize_tag) | |
Constructor: copies the specified iterator in. More... | |
DereferenceIteratorBase (Iter &&iter, initialize_tag) | |
Constructor: acquires the specified iterator. More... | |
template<typename OtherIter , typename OtherValue > | |
DereferenceIteratorBase (DereferenceIteratorBase< iterator_t, OtherValue > const &other) | |
Generic copy constructor. More... | |
template<typename OtherIter , typename OtherValue > | |
DereferenceIteratorBase (DereferenceIteratorBase< iterator_t, OtherValue > &&other) | |
Generic move constructor. More... | |
reference | operator* () const |
Returns a reference to the data pointed by the original iterator. More... | |
pointer | operator-> () const |
Returns a reference to the data pointed by the original iterator. More... | |
reference | operator[] (difference_type i) const |
Returns a reference to the i-th element after the pointed one. More... | |
this_t & | operator++ () |
Prefix increment operator. More... | |
this_t & | operator-- () |
Prefix decrement operator. More... | |
this_t | operator++ (int) |
Postfix increment operator. More... | |
this_t | operator-- (int) |
Postfix decrement operator. More... | |
difference_type | operator- (this_t const &other) const |
Returns the difference from another iterator. More... | |
bool | is_null () const |
Bonus: returns true if the pointer is not dereferentiable. More... | |
this_t | operator+ (difference_type offset) const |
this_t | operator- (difference_type offset) const |
this_t & | operator+= (difference_type offset) |
this_t & | operator-= (difference_type offset) |
Comparison operators between iterators | |
bool | operator== (this_t const &other) const |
bool | operator!= (this_t const &other) const |
bool | operator<= (this_t const &other) const |
bool | operator>= (this_t const &other) const |
bool | operator< (this_t const &other) const |
bool | operator> (this_t const &other) const |
Private Types | |
using | iterator_t = Iter |
wrapped iterator type More... | |
using | this_t = DereferenceIteratorBase< Iter, Value > |
this type More... | |
Private Attributes | |
iterator_t | iter |
wrapper iterator More... | |
Base class for dereferencing iterators.
Definition at line 60 of file DereferenceIterator.h.
using lar::util::detail::DereferenceIteratorBase< Iter, Value >::difference_type = typename iterator_t::difference_type |
Definition at line 73 of file DereferenceIterator.h.
using lar::util::detail::DereferenceIteratorBase< Iter, Value >::iterator_category = typename iterator_t::iterator_category |
Definition at line 77 of file DereferenceIterator.h.
|
private |
wrapped iterator type
Definition at line 61 of file DereferenceIterator.h.
using lar::util::detail::DereferenceIteratorBase< Iter, Value >::pointer = std::add_pointer_t<value_type> |
Definition at line 75 of file DereferenceIterator.h.
using lar::util::detail::DereferenceIteratorBase< Iter, Value >::reference = std::add_lvalue_reference_t<value_type> |
Definition at line 76 of file DereferenceIterator.h.
|
private |
this type
Definition at line 62 of file DereferenceIterator.h.
using lar::util::detail::DereferenceIteratorBase< Iter, Value >::value_type = Value |
Definition at line 74 of file DereferenceIterator.h.
|
default |
Default constructor.
|
inline |
Constructor: copies the specified iterator in.
Definition at line 86 of file DereferenceIterator.h.
|
inline |
Constructor: acquires the specified iterator.
Definition at line 90 of file DereferenceIterator.h.
|
inline |
Generic copy constructor.
OtherIter | base iterator: must be assignable to iterator_t |
OtherValue | value type: must be convertible into value_type |
Definition at line 98 of file DereferenceIterator.h.
References fhicl::detail::atom::value().
|
inline |
Generic move constructor.
OtherIter | base iterator: must be assignable to iterator_t |
OtherValue | value type: must be convertible into value_type |
Definition at line 111 of file DereferenceIterator.h.
References fhicl::detail::atom::value().
|
inline |
Bonus: returns true if the pointer is not dereferentiable.
Definition at line 160 of file DereferenceIterator.h.
References operator*().
|
inline |
Definition at line 167 of file DereferenceIterator.h.
References lar::util::detail::DereferenceIteratorBase< Iter, Value >::iter.
|
inline |
Returns a reference to the data pointed by the original iterator.
Definition at line 121 of file DereferenceIterator.h.
|
inline |
Arithmetic operators (symmetric)
Definition at line 143 of file DereferenceIterator.h.
|
inline |
Prefix increment operator.
Definition at line 130 of file DereferenceIterator.h.
|
inline |
Postfix increment operator.
Definition at line 136 of file DereferenceIterator.h.
|
inline |
Arithmetic operators (symmetric)
Definition at line 148 of file DereferenceIterator.h.
|
inline |
Arithmetic operators (symmetric)
Definition at line 145 of file DereferenceIterator.h.
|
inline |
Returns the difference from another iterator.
Definition at line 156 of file DereferenceIterator.h.
References lar::util::detail::DereferenceIteratorBase< Iter, Value >::iter.
|
inline |
Prefix decrement operator.
Definition at line 133 of file DereferenceIterator.h.
|
inline |
Postfix decrement operator.
Definition at line 139 of file DereferenceIterator.h.
|
inline |
Arithmetic operators (symmetric)
Definition at line 150 of file DereferenceIterator.h.
|
inline |
Returns a reference to the data pointed by the original iterator.
Definition at line 124 of file DereferenceIterator.h.
|
inline |
Definition at line 173 of file DereferenceIterator.h.
References lar::util::detail::DereferenceIteratorBase< Iter, Value >::iter.
|
inline |
Definition at line 169 of file DereferenceIterator.h.
References lar::util::detail::DereferenceIteratorBase< Iter, Value >::iter.
|
inline |
Definition at line 165 of file DereferenceIterator.h.
References lar::util::detail::DereferenceIteratorBase< Iter, Value >::iter.
|
inline |
Definition at line 175 of file DereferenceIterator.h.
References lar::util::detail::DereferenceIteratorBase< Iter, Value >::iter.
|
inline |
Definition at line 171 of file DereferenceIterator.h.
References lar::util::detail::DereferenceIteratorBase< Iter, Value >::iter.
|
inline |
Returns a reference to the i-th element after the pointed one.
Definition at line 127 of file DereferenceIterator.h.
|
private |
wrapper iterator
Definition at line 64 of file DereferenceIterator.h.
Referenced by lar::util::detail::DereferenceIteratorBase< Iter, Value >::operator!=(), lar::util::detail::DereferenceIteratorBase< Iter, Value >::operator-(), lar::util::detail::DereferenceIteratorBase< Iter, Value >::operator<(), lar::util::detail::DereferenceIteratorBase< Iter, Value >::operator<=(), lar::util::detail::DereferenceIteratorBase< Iter, Value >::operator==(), lar::util::detail::DereferenceIteratorBase< Iter, Value >::operator>(), and lar::util::detail::DereferenceIteratorBase< Iter, Value >::operator>=().