Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER > Class Template Reference

template<class REFERENCE, class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
class ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >

Iterates over an index; the REFERENCE is defined by the REFERENCE template parameter.

Derived classes are expected to implement const REFERENCE& operator*() and const POINTER operator->().

Definition at line 35 of file RIndexIter.hxx.

Public Types

using difference_type = std::ptrdiff_t
 
using iterator_category = std::random_access_iterator_tag
 
using pointer = POINTER
 
using reference = REFERENCE
 
using value_type = typename std::remove_reference< REFERENCE >::type
 

Public Member Functions

 RIndexIter (size_t idx)
 
size_t GetIndex () const noexcept
 Get the current index value.
 
Index modifiers

++i

RIndexIteroperator++ () noexcept
 
RIndexIteroperator-- () noexcept
 –i
 
RIndexIter operator++ (int) noexcept
 i++
 
RIndexIter operator-- (int) noexcept
 
RIndexIteroperator+= (int d) noexcept
 
RIndexIteroperator-= (int d) noexcept
 
RIndexIter operator+ (int d) noexcept
 
RIndexIter operator- (int d) noexcept
 

Static Protected Attributes

static constexpr size_t fgEndIndex = (size_t)-1
 

Private Attributes

size_t fIndex
 

#include <ROOT/RIndexIter.hxx>

Member Typedef Documentation

◆ difference_type

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
using ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::difference_type = std::ptrdiff_t

Definition at line 44 of file RIndexIter.hxx.

◆ iterator_category

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
using ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::iterator_category = std::random_access_iterator_tag

Definition at line 42 of file RIndexIter.hxx.

◆ pointer

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
using ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::pointer = POINTER

Definition at line 45 of file RIndexIter.hxx.

◆ reference

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
using ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::reference = REFERENCE

Definition at line 46 of file RIndexIter.hxx.

◆ value_type

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
using ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::value_type = typename std::remove_reference<REFERENCE>::type

Definition at line 43 of file RIndexIter.hxx.

Constructor & Destructor Documentation

◆ RIndexIter()

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::RIndexIter ( size_t  idx)
inline

Definition at line 48 of file RIndexIter.hxx.

Member Function Documentation

◆ GetIndex()

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
size_t ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::GetIndex ( ) const
inlinenoexcept

Get the current index value.

Definition at line 51 of file RIndexIter.hxx.

◆ operator+()

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator+ ( int  d)
inlinenoexcept

Definition at line 102 of file RIndexIter.hxx.

◆ operator++() [1/2]

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter & ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator++ ( )
inlinenoexcept

Definition at line 56 of file RIndexIter.hxx.

◆ operator++() [2/2]

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator++ ( int  )
inlinenoexcept

i++

Definition at line 71 of file RIndexIter.hxx.

◆ operator+=()

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter & ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator+= ( int  d)
inlinenoexcept

Definition at line 86 of file RIndexIter.hxx.

◆ operator-()

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator- ( int  d)
inlinenoexcept

Definition at line 109 of file RIndexIter.hxx.

◆ operator--() [1/2]

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter & ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator-- ( )
inlinenoexcept

–i

Definition at line 63 of file RIndexIter.hxx.

◆ operator--() [2/2]

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator-- ( int  )
inlinenoexcept

Definition at line 79 of file RIndexIter.hxx.

◆ operator-=()

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
RIndexIter & ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::operator-= ( int  d)
inlinenoexcept

Definition at line 92 of file RIndexIter.hxx.

Member Data Documentation

◆ fgEndIndex

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
constexpr size_t ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::fgEndIndex = (size_t)-1
staticconstexprprotected

Definition at line 39 of file RIndexIter.hxx.

◆ fIndex

template<class REFERENCE , class POINTER = typename std::add_pointer<typename std::remove_reference<REFERENCE>::type>::type>
size_t ROOT::Experimental::Internal::RIndexIter< REFERENCE, POINTER >::fIndex
private

Definition at line 36 of file RIndexIter.hxx.

  • core/base/v7/inc/ROOT/RIndexIter.hxx