Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::Range< Iterator > Class Template Reference

#include <acts/blob/sPHENIX/Examples/Framework/include/ActsExamples/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 ActsExamples::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>
ActsExamples::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>
ActsExamples::Range< Iterator >::Range ( Range< Iterator > &&  )
default
template<typename Iterator>
ActsExamples::Range< Iterator >::Range ( const Range< Iterator > &  )
default
template<typename Iterator>
ActsExamples::Range< Iterator >::~Range ( )
default

Member Function Documentation

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

Definition at line 36 of file Range.hpp.

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

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

template<typename Iterator>
bool ActsExamples::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 ActsExamples::Range< Iterator >::m_begin, and ActsExamples::Range< Iterator >::m_end.

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

Definition at line 37 of file Range.hpp.

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

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

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

Definition at line 39 of file Range.hpp.

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

References distance(), ActsExamples::Range< Iterator >::m_begin, and ActsExamples::Range< Iterator >::m_end.

+ Here is the call graph for this function:

Member Data Documentation

template<typename Iterator>
Iterator ActsExamples::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 ActsExamples::Range< Iterator >::begin(), ActsExamples::Range< Iterator >::empty(), and ActsExamples::Range< Iterator >::size().

template<typename Iterator>
Iterator ActsExamples::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 ActsExamples::Range< Iterator >::empty(), ActsExamples::Range< Iterator >::end(), and ActsExamples::Range< Iterator >::size().


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