LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "MappedContainer.h"
Public Types | |
Traits | |
using | value_type = std::remove_cv_t< typename Container_t::value_type > |
using | difference_type = typename Container_t::difference_type |
using | size_type = typename Container_t::size_type |
using | reference = Reference_t |
using | pointer = decltype(&std::declval< reference >()) |
using | iterator_category = std::input_iterator_tag |
Public Member Functions | |
IteratorBase ()=default | |
Constructor: an invalid iterator. More... | |
IteratorBase (Container_t &cont, MappingIndex_t index) | |
Constructor: iterator pointing to element index of cont . More... | |
IteratorBase (Iterator_t const &)=default | |
Copy constructor. More... | |
template<typename OC , typename OR > | |
IteratorBase (IteratorBase< OC, OR > const &from) | |
Copy constructor: from a different container type. More... | |
Iterator_t & | operator= (Iterator_t const &)=default |
Copy assignment. More... | |
template<typename OC , typename OR > | |
Iterator_t & | operator= (IteratorBase< OC, OR > const &from) |
Assignment from a different container type. More... | |
Dereferencing | |
Returns the mapped item the iterator currently points to. | |
reference | operator* () const |
Returns a member of the mapped item the iterator currently points to. More... | |
reference | operator-> () const |
Returns a member of the mapped item the iterator currently points to. More... | |
reference | operator[] (difference_type n) const |
Transformation | |
Increments this iterator and returns it incremented. | |
Iterator_t & | operator++ () |
Increments this iterator and returns its old value. More... | |
Iterator_t | operator++ (int) |
Increments this iterator and returns its old value. More... | |
Iterator_t & | operator-- () |
Decrements this iterator and returns it decremented. More... | |
Iterator_t | operator-- (int) |
Decrements this iterator and returns its old value. More... | |
Iterator_t & | operator+= (difference_type n) |
Increments this iterator by n steps and returns it incremented. More... | |
Iterator_t & | operator-= (difference_type n) |
Decrements this iterator by n steps and returns it decremented. More... | |
Iterator_t | operator+ (difference_type n) const |
Returns an iterator pointing n steps ahead of this one. More... | |
Iterator_t | operator- (difference_type n) const |
Returns an iterator pointing n steps behind this one. More... | |
difference_type | operator- (Iterator_t &other) const |
Returns the number of steps this iterator is ahead of other . More... | |
Comparisons | |
Returns whether this iterator is equal to | |
template<typename OC , typename OR > | |
bool | operator== (IteratorBase< OC, OR > const &other) const |
Returns whether this iterator is not equal to other . More... | |
template<typename OC , typename OR > | |
bool | operator!= (IteratorBase< OC, OR > const &other) const |
Returns whether this iterator is not equal to other . More... | |
template<typename OC , typename OR > | |
bool | operator<= (IteratorBase< OC, OR > const &other) const |
Returns whether this iterator is behind of or equal to other . More... | |
template<typename OC , typename OR > | |
bool | operator< (IteratorBase< OC, OR > const &other) const |
Returns whether this iterator is strictly behind of other . More... | |
template<typename OC , typename OR > | |
bool | operator>= (IteratorBase< OC, OR > const &other) const |
Returns whether this iterator is ahead of or equal to other . More... | |
template<typename OC , typename OR > | |
bool | operator> (IteratorBase< OC, OR > const &other) const |
Returns whether this iterator is strictly ahead of other . More... | |
Private Types | |
using | Container_t = Container |
using | Reference_t = Reference |
using | Iterator_t = IteratorBase< Container_t, Reference_t > |
This type. More... | |
Private Attributes | |
Container_t * | fCont = nullptr |
Pointer to the container. More... | |
MappingIndex_t | fIndex = InvalidIndex |
Current index in container. More... | |
Definition at line 150 of file MappedContainer.h.
|
private |
Definition at line 516 of file MappedContainer.h.
using util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::difference_type = typename Container_t::difference_type |
Definition at line 531 of file MappedContainer.h.
using util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::iterator_category = std::input_iterator_tag |
Definition at line 535 of file MappedContainer.h.
|
private |
This type.
Definition at line 520 of file MappedContainer.h.
using util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::pointer = decltype(&std::declval<reference>()) |
Definition at line 534 of file MappedContainer.h.
using util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::reference = Reference_t |
Definition at line 533 of file MappedContainer.h.
|
private |
Definition at line 517 of file MappedContainer.h.
using util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::size_type = typename Container_t::size_type |
Definition at line 532 of file MappedContainer.h.
using util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::value_type = std::remove_cv_t<typename Container_t::value_type> |
Definition at line 530 of file MappedContainer.h.
|
default |
Constructor: an invalid iterator.
|
inline |
Constructor: iterator pointing to element index
of cont
.
Definition at line 544 of file MappedContainer.h.
|
default |
Copy constructor.
|
inline |
Copy constructor: from a different container type.
Definition at line 551 of file MappedContainer.h.
|
inline |
Returns whether this iterator is not equal to other
.
Definition at line 663 of file MappedContainer.h.
References util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fCont, and util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fIndex.
|
inline |
Returns a member of the mapped item the iterator currently points to.
Definition at line 570 of file MappedContainer.h.
|
inline |
Returns an iterator pointing n
steps ahead of this one.
Definition at line 630 of file MappedContainer.h.
References n.
|
inline |
Increments this iterator and returns its old value.
Definition at line 586 of file MappedContainer.h.
|
inline |
Increments this iterator and returns its old value.
Definition at line 593 of file MappedContainer.h.
|
inline |
Increments this iterator by n
steps and returns it incremented.
Definition at line 616 of file MappedContainer.h.
References n.
|
inline |
Returns an iterator pointing n
steps behind this one.
Definition at line 638 of file MappedContainer.h.
References n.
|
inline |
Returns the number of steps this iterator is ahead of other
.
Definition at line 646 of file MappedContainer.h.
References util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fIndex.
|
inline |
Decrements this iterator and returns it decremented.
Definition at line 601 of file MappedContainer.h.
|
inline |
Decrements this iterator and returns its old value.
Definition at line 608 of file MappedContainer.h.
|
inline |
Decrements this iterator by n
steps and returns it decremented.
Definition at line 623 of file MappedContainer.h.
References n.
|
inline |
Returns a member of the mapped item the iterator currently points to.
Definition at line 573 of file MappedContainer.h.
References operator*().
|
inline |
Returns whether this iterator is strictly behind of other
.
Definition at line 677 of file MappedContainer.h.
References fhicl::other.
|
inline |
Returns whether this iterator is behind of or equal to other
.
Definition at line 670 of file MappedContainer.h.
References fhicl::other.
|
default |
Copy assignment.
|
inline |
Assignment from a different container type.
Definition at line 559 of file MappedContainer.h.
References util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fCont, and util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fIndex.
|
inline |
Returns whether this iterator is not equal to other
.
Definition at line 656 of file MappedContainer.h.
References util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fCont, and util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fIndex.
|
inline |
Returns whether this iterator is strictly ahead of other
.
Definition at line 691 of file MappedContainer.h.
References util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fCont, and util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fIndex.
|
inline |
Returns whether this iterator is ahead of or equal to other
.
Definition at line 684 of file MappedContainer.h.
References util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fCont, and util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::fIndex.
|
inline |
Returns the mapped item n
steps ahead of what the iterator currentlt points to.
Definition at line 577 of file MappedContainer.h.
References n.
|
private |
Pointer to the container.
Definition at line 522 of file MappedContainer.h.
Referenced by util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator!=(), util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator=(), util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator==(), util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator>(), and util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator>=().
|
private |
Current index in container.
Definition at line 523 of file MappedContainer.h.
Referenced by util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator!=(), util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator-(), util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator=(), util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator==(), util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator>(), and util::MappedContainer< Cont, Mapping >::IteratorBase< Container, Reference >::operator>=().