Logo ROOT   6.14/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 68 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 (std::size_t index, TTreeReaderArray *array)
 Construct iterator. More...
 
 Iterator_t (std::size_t index, const TTreeReaderArray *array)
 Construct iterator from a const TTreeReaderArray. More...
 
 Iterator_t (Iterator_t &&)=default
 
 Iterator_t (const Iterator_t &)=default
 
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)
 
Iterator_t operator- (std::ptrdiff_t n) const
 
std::ptrdiff_t operator- (const Iterator_t &other) 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= (Iterator_t &&)=default
 
Iterator_toperator= (const 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 73 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 71 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 74 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 75 of file TTreeReaderArray.h.

◆ value_type

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

Definition at line 72 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 83 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 86 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 94 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 181 of file TTreeReaderArray.h.

◆ operator pointer()

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

Definition at line 179 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 118 of file TTreeReaderArray.h.

◆ operator*()

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

Definition at line 102 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 156 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 121 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 131 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 168 of file TTreeReaderArray.h.

◆ operator-() [1/2]

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

Definition at line 159 of file TTreeReaderArray.h.

◆ operator-() [2/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 166 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 139 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 149 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 170 of file TTreeReaderArray.h.

◆ operator->()

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

Definition at line 108 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 172 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 174 of file TTreeReaderArray.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

template<typename T>
template<typename ReaderArrayType >
Iterator_t& TTreeReaderArray< T >::Iterator_t< ReaderArrayType >::operator= ( const 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 110 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 173 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 175 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 177 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 157 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 78 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 79 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 80 of file TTreeReaderArray.h.

Libraries for TTreeReaderArray< T >::Iterator_t< ReaderArrayType >:
[legend]

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