Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Mantid::Geometry::InfoIteratorBase< T, InfoItem > Class Template Reference

InfoIterator. More...

#include <InfoIteratorBase.h>

Inheritance diagram for Mantid::Geometry::InfoIteratorBase< T, InfoItem >:

Public Member Functions

 InfoIteratorBase (T &info, const size_t index, const size_t totalSize)
 Constructor for base iterator. More...
 

Private Member Functions

void advance (int64_t delta)
 
void decrement ()
 
InfoItem< T > dereference () const
 
uint64_t distance_to (const InfoIteratorBase< T, InfoItem > &other) const
 
bool equal (const InfoIteratorBase< T, InfoItem > &other) const
 
size_t getIndex () const
 
void increment ()
 
void setIndex (const size_t index)
 

Private Attributes

InfoItem< T > m_item
 
size_t m_totalSize
 

Friends

class boost::iterator_core_access
 

Detailed Description

template<typename T, template< typename > class InfoItem>
class Mantid::Geometry::InfoIteratorBase< T, InfoItem >

InfoIterator.

Base to allow users of the Info objects (DetectorInfo etc) access to data via a random access iterator.

Note that the reference type (InfoItem<T>) causes the iterator to be treated as std::input_iterator for the purposes of many std algorithms such as std::advance. See https://en.cppreference.com/w/cpp/iterator/advance for example

Definition at line 25 of file InfoIteratorBase.h.

Constructor & Destructor Documentation

◆ InfoIteratorBase()

template<typename T , template< typename > class InfoItem>
Mantid::Geometry::InfoIteratorBase< T, InfoItem >::InfoIteratorBase ( T &  info,
const size_t  index,
const size_t  totalSize 
)
inline

Constructor for base iterator.

Parameters
info: Info object (T) to provide iterator ontop of.
index: start point of iterator
totalSize: Represents maximum length of info. i.e. total number of items that can be iterated over.

Definition at line 36 of file InfoIteratorBase.h.

References index.

Member Function Documentation

◆ advance()

template<typename T , template< typename > class InfoItem>
void Mantid::Geometry::InfoIteratorBase< T, InfoItem >::advance ( int64_t  delta)
inlineprivate

◆ decrement()

template<typename T , template< typename > class InfoItem>
void Mantid::Geometry::InfoIteratorBase< T, InfoItem >::decrement ( )
inlineprivate

◆ dereference()

template<typename T , template< typename > class InfoItem>
InfoItem< T > Mantid::Geometry::InfoIteratorBase< T, InfoItem >::dereference ( ) const
inlineprivate

◆ distance_to()

template<typename T , template< typename > class InfoItem>
uint64_t Mantid::Geometry::InfoIteratorBase< T, InfoItem >::distance_to ( const InfoIteratorBase< T, InfoItem > &  other) const
inlineprivate

◆ equal()

template<typename T , template< typename > class InfoItem>
bool Mantid::Geometry::InfoIteratorBase< T, InfoItem >::equal ( const InfoIteratorBase< T, InfoItem > &  other) const
inlineprivate

◆ getIndex()

template<typename T , template< typename > class InfoItem>
size_t Mantid::Geometry::InfoIteratorBase< T, InfoItem >::getIndex ( ) const
inlineprivate

◆ increment()

template<typename T , template< typename > class InfoItem>
void Mantid::Geometry::InfoIteratorBase< T, InfoItem >::increment ( )
inlineprivate

◆ setIndex()

template<typename T , template< typename > class InfoItem>
void Mantid::Geometry::InfoIteratorBase< T, InfoItem >::setIndex ( const size_t  index)
inlineprivate

Friends And Related Function Documentation

◆ boost::iterator_core_access

template<typename T , template< typename > class InfoItem>
friend class boost::iterator_core_access
friend

Definition at line 43 of file InfoIteratorBase.h.

Member Data Documentation

◆ m_item

template<typename T , template< typename > class InfoItem>
InfoItem<T> Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_item
private

◆ m_totalSize

template<typename T , template< typename > class InfoItem>
size_t Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_totalSize
private

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