Logo ROOT   6.18/05
Reference Guide
List of all members | Public Types | Public Member Functions | Private Attributes | Friends | List of all members
TTreeReaderArray< T >::Iterator_t< ReaderArrayType > Class Template Reference

template<typename T>
template<typename ReaderArrayType>
class TTreeReaderArray< T >::Iterator_t< ReaderArrayType >

Random access iterator to the elements of a TTreeReaderArray.

Definition at line 82 of file TTreeReaderArray.h.

Public Types

using difference_type = std::ptrdiff_t
 
using iterator_category = std::random_access_iterator_tag
 
using pointer = typename std::conditional< std::is_const< ReaderArrayType >::value, const T *, T * >::type
 
using reference = typename std::conditional< std::is_const< ReaderArrayType >::value, const T &, T & >::type
 
using value_type = T
 

Public Member Functions

 Iterator_t ()
 Default ctor: constructs a past-the-end iterator. More...
 
 Iterator_t (const Iterator_t &)=default
 
 Iterator_t (Iterator_t &&)=default
 
 Iterator_t (std::size_t index, const TTreeReaderArray *array)
 Construct iterator from a const TTreeReaderArray. More...
 
 Iterator_t (std::size_t index, TTreeReaderArray *array)
 Construct iterator. More...
 
bool IsValid () const
 
 operator pointer ()
 
bool operator!= (const Iterator_t &other) const
 
reference operator* () const
 
Iterator_t operator+ (std::ptrdiff_t n) const
 
Iterator_toperator++ ()
 Pre-increment operator. More...
 
Iterator_t operator++ (int)
 Post-increment operator. More...
 
Iterator_toperator+= (std::ptrdiff_t n)
 
std::ptrdiff_t operator- (const Iterator_t &other) const
 
Iterator_t operator- (std::ptrdiff_t n) const
 
Iterator_toperator-- ()
 Pre-decrement operator. More...
 
Iterator_t operator-- (int)
 Post-decrement operator. More...
 
Iterator_toperator-= (std::ptrdiff_t n)
 
pointer operator-> () const
 
bool operator< (const Iterator_t &other) const
 
bool operator<= (const Iterator_t &other) const
 
Iterator_toperator= (const Iterator_t &)=default
 
Iterator_toperator= (Iterator_t &&)=default
 
bool operator== (const Iterator_t &other) const
 
bool operator> (const Iterator_t &other) const
 
bool operator>= (const Iterator_t &other) const
 
reference operator[] (std::size_t index) const
 

Private Attributes

TTreeReaderArrayfArray
 The array iterated over; nullptr if invalid/past-the-end. More...
 
std::size_t fIndex
 Current index in the array. More...
 
std::size_t fSize
 Size of the TTreeReaderArray. More...
 

Friends

auto operator+ (std::ptrdiff_t n, const Iterator_t &it) -> decltype(it+n)
 

#include <TTreeReaderArray.h>

Member Typedef Documentation

◆ difference_type

template<typename T >
template<typename ReaderArrayType >
using TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::difference_type = std::ptrdiff_t

Definition at line 87 of file TTreeReaderArray.h.

◆ iterator_category

template<typename T >
template<typename ReaderArrayType >
using TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::iterator_category = std::random_access_iterator_tag

Definition at line 85 of file TTreeReaderArray.h.

◆ pointer

template<typename T >
template<typename ReaderArrayType >
using TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::pointer = typename std::conditional<std::is_const<ReaderArrayType>::value, const T *, T *>::type

Definition at line 88 of file TTreeReaderArray.h.

◆ reference

template<typename T >
template<typename ReaderArrayType >
using TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::reference = typename std::conditional<std::is_const<ReaderArrayType>::value, const T &, T &>::type

Definition at line 89 of file TTreeReaderArray.h.

◆ value_type

template<typename T >
template<typename ReaderArrayType >
using TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::value_type = T

Definition at line 86 of file TTreeReaderArray.h.

Constructor & Destructor Documentation

◆ Iterator_t() [1/5]

template<typename T >
template<typename ReaderArrayType >
TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::Iterator_t ( )
inline

Default ctor: constructs a past-the-end iterator.

Definition at line 97 of file TTreeReaderArray.h.

◆ Iterator_t() [2/5]

template<typename T >
template<typename ReaderArrayType >
TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::Iterator_t ( std::size_t  index,
TTreeReaderArray array 
)
inline

Construct iterator.

Definition at line 100 of file TTreeReaderArray.h.

◆ Iterator_t() [3/5]

template<typename T >
template<typename ReaderArrayType >
TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::Iterator_t ( std::size_t  index,
const TTreeReaderArray array 
)
inline

Construct iterator from a const TTreeReaderArray.

Definition at line 108 of file TTreeReaderArray.h.

◆ Iterator_t() [4/5]

template<typename T >
template<typename ReaderArrayType >
TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::Iterator_t ( Iterator_t< ReaderArrayType > &&  )
default

◆ Iterator_t() [5/5]

template<typename T >
template<typename ReaderArrayType >
TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::Iterator_t ( const Iterator_t< ReaderArrayType > &  )
default

Member Function Documentation

◆ IsValid()

template<typename T >
template<typename ReaderArrayType >
bool TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::IsValid ( ) const
inline

Definition at line 195 of file TTreeReaderArray.h.

◆ operator pointer()

template<typename T >
template<typename ReaderArrayType >
TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator pointer ( )
inline

Definition at line 193 of file TTreeReaderArray.h.

◆ operator!=()

template<typename T >
template<typename ReaderArrayType >
bool TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator!= ( const Iterator_t< ReaderArrayType > &  other) const
inline

Definition at line 132 of file TTreeReaderArray.h.

◆ operator*()

template<typename T >
template<typename ReaderArrayType >
reference TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator* ( ) const
inline

Definition at line 116 of file TTreeReaderArray.h.

◆ operator+()

template<typename T >
template<typename ReaderArrayType >
Iterator_t TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator+ ( std::ptrdiff_t  n) const
inline

Definition at line 170 of file TTreeReaderArray.h.

◆ operator++() [1/2]

template<typename T >
template<typename ReaderArrayType >
Iterator_t & TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator++ ( )
inline

Pre-increment operator.

Definition at line 135 of file TTreeReaderArray.h.

◆ operator++() [2/2]

template<typename T >
template<typename ReaderArrayType >
Iterator_t TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator++ ( int  )
inline

Post-increment operator.

Definition at line 145 of file TTreeReaderArray.h.

◆ operator+=()

template<typename T >
template<typename ReaderArrayType >
Iterator_t & TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator+= ( std::ptrdiff_t  n)
inline

Definition at line 182 of file TTreeReaderArray.h.

◆ operator-() [1/2]

template<typename T >
template<typename ReaderArrayType >
std::ptrdiff_t TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator- ( const Iterator_t< ReaderArrayType > &  other) const
inline

Definition at line 180 of file TTreeReaderArray.h.

◆ operator-() [2/2]

template<typename T >
template<typename ReaderArrayType >
Iterator_t TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator- ( std::ptrdiff_t  n) const
inline

Definition at line 173 of file TTreeReaderArray.h.

◆ operator--() [1/2]

template<typename T >
template<typename ReaderArrayType >
Iterator_t & TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator-- ( )
inline

Pre-decrement operator.

Definition at line 153 of file TTreeReaderArray.h.

◆ operator--() [2/2]

template<typename T >
template<typename ReaderArrayType >
Iterator_t TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator-- ( int  )
inline

Post-decrement operator.

Definition at line 163 of file TTreeReaderArray.h.

◆ operator-=()

template<typename T >
template<typename ReaderArrayType >
Iterator_t & TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator-= ( std::ptrdiff_t  n)
inline

Definition at line 184 of file TTreeReaderArray.h.

◆ operator->()

template<typename T >
template<typename ReaderArrayType >
pointer TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator-> ( ) const
inline

Definition at line 122 of file TTreeReaderArray.h.

◆ operator<()

template<typename T >
template<typename ReaderArrayType >
bool TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator< ( const Iterator_t< ReaderArrayType > &  other) const
inline

Definition at line 186 of file TTreeReaderArray.h.

◆ operator<=()

template<typename T >
template<typename ReaderArrayType >
bool TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator<= ( const Iterator_t< ReaderArrayType > &  other) const
inline

Definition at line 188 of file TTreeReaderArray.h.

◆ operator=() [1/2]

template<typename T >
template<typename ReaderArrayType >
Iterator_t & TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator= ( const Iterator_t< ReaderArrayType > &  )
default

◆ operator=() [2/2]

template<typename T >
template<typename ReaderArrayType >
Iterator_t & TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator= ( Iterator_t< ReaderArrayType > &&  )
default

◆ operator==()

template<typename T >
template<typename ReaderArrayType >
bool TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator== ( const Iterator_t< ReaderArrayType > &  other) const
inline

Definition at line 124 of file TTreeReaderArray.h.

◆ operator>()

template<typename T >
template<typename ReaderArrayType >
bool TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator> ( const Iterator_t< ReaderArrayType > &  other) const
inline

Definition at line 187 of file TTreeReaderArray.h.

◆ operator>=()

template<typename T >
template<typename ReaderArrayType >
bool TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator>= ( const Iterator_t< ReaderArrayType > &  other) const
inline

Definition at line 189 of file TTreeReaderArray.h.

◆ operator[]()

template<typename T >
template<typename ReaderArrayType >
reference TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator[] ( std::size_t  index) const
inline

Definition at line 191 of file TTreeReaderArray.h.

Friends And Related Function Documentation

◆ operator+

template<typename T >
template<typename ReaderArrayType >
auto operator+ ( std::ptrdiff_t  n,
const Iterator_t< ReaderArrayType > &  it 
) -> decltype(it + n)
friend

Definition at line 171 of file TTreeReaderArray.h.

Member Data Documentation

◆ fArray

template<typename T >
template<typename ReaderArrayType >
TTreeReaderArray* TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::fArray
private

The array iterated over; nullptr if invalid/past-the-end.

Definition at line 92 of file TTreeReaderArray.h.

◆ fIndex

template<typename T >
template<typename ReaderArrayType >
std::size_t TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::fIndex
private

Current index in the array.

Definition at line 93 of file TTreeReaderArray.h.

◆ fSize

template<typename T >
template<typename ReaderArrayType >
std::size_t TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::fSize
private

Size of the TTreeReaderArray.

Definition at line 94 of file TTreeReaderArray.h.


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