ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FW::Range< Iterator > Class Template Reference

#include <acts/blob/master/Examples/Framework/include/ACTFW/Utilities/Range.hpp>

Public Member Functions

 Range (Iterator b, Iterator e)
 
 Range (Range &&)=default
 
 Range (const Range &)=default
 
 ~Range ()=default
 
Rangeoperator= (Range &&)=default
 
Rangeoperator= (const Range &)=default
 
Iterator begin () const
 
Iterator end () const
 
bool empty () const
 
std::size_t size () const
 

Private Attributes

Iterator m_begin
 
Iterator m_end
 

Detailed Description

template<typename Iterator>
class FW::Range< Iterator >

A wrapper around a pair of iterators to simplify range-based loops.

Some standard library algorithms return pairs of iterators to identify a sub-range. This wrapper simplifies the iteration and should be used as follows:

for (auto x : makeRange(std::equal_range(...)) {
    ...

Definition at line 27 of file Range.hpp.

View newest version in sPHENIX GitHub at line 27 of file Range.hpp

Constructor & Destructor Documentation

template<typename Iterator>
FW::Range< Iterator >::Range ( Iterator  b,
Iterator  e 
)
inline

Definition at line 29 of file Range.hpp.

View newest version in sPHENIX GitHub at line 29 of file Range.hpp

template<typename Iterator>
FW::Range< Iterator >::Range ( Range< Iterator > &&  )
default
template<typename Iterator>
FW::Range< Iterator >::Range ( const Range< Iterator > &  )
default
template<typename Iterator>
FW::Range< Iterator >::~Range ( )
default

Member Function Documentation

template<typename Iterator>
Iterator FW::Range< Iterator >::begin ( ) const
inline

Definition at line 36 of file Range.hpp.

View newest version in sPHENIX GitHub at line 36 of file Range.hpp

References FW::Range< Iterator >::m_begin.

template<typename Iterator>
bool FW::Range< Iterator >::empty ( ) const
inline

Definition at line 38 of file Range.hpp.

View newest version in sPHENIX GitHub at line 38 of file Range.hpp

References FW::Range< Iterator >::m_begin, and FW::Range< Iterator >::m_end.

template<typename Iterator>
Iterator FW::Range< Iterator >::end ( ) const
inline

Definition at line 37 of file Range.hpp.

View newest version in sPHENIX GitHub at line 37 of file Range.hpp

References FW::Range< Iterator >::m_end.

template<typename Iterator>
Range& FW::Range< Iterator >::operator= ( Range< Iterator > &&  )
default
template<typename Iterator>
Range& FW::Range< Iterator >::operator= ( const Range< Iterator > &  )
default
template<typename Iterator>
std::size_t FW::Range< Iterator >::size ( ) const
inline

Definition at line 39 of file Range.hpp.

View newest version in sPHENIX GitHub at line 39 of file Range.hpp

References FW::Range< Iterator >::m_begin, and FW::Range< Iterator >::m_end.

Member Data Documentation

template<typename Iterator>
Iterator FW::Range< Iterator >::m_begin
private

Definition at line 42 of file Range.hpp.

View newest version in sPHENIX GitHub at line 42 of file Range.hpp

Referenced by FW::Range< Iterator >::begin(), FW::Range< Iterator >::empty(), and FW::Range< Iterator >::size().

template<typename Iterator>
Iterator FW::Range< Iterator >::m_end
private

Definition at line 43 of file Range.hpp.

View newest version in sPHENIX GitHub at line 43 of file Range.hpp

Referenced by FW::Range< Iterator >::empty(), FW::Range< Iterator >::end(), and FW::Range< Iterator >::size().


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