Mantid
|
InfoIterator. More...
#include <InfoIteratorBase.h>
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 |
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.
|
inline |
Constructor for base iterator.
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.
|
inlineprivate |
Definition at line 45 of file InfoIteratorBase.h.
References Mantid::Kernel::delta, Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_item, and Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_totalSize.
|
inlineprivate |
Definition at line 58 of file InfoIteratorBase.h.
References Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_item.
|
inlineprivate |
Definition at line 68 of file InfoIteratorBase.h.
References Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_item.
|
inlineprivate |
Definition at line 70 of file InfoIteratorBase.h.
References Mantid::Geometry::InfoIteratorBase< T, InfoItem >::getIndex().
|
inlineprivate |
Definition at line 50 of file InfoIteratorBase.h.
References Mantid::Geometry::InfoIteratorBase< T, InfoItem >::getIndex().
|
inlineprivate |
Definition at line 64 of file InfoIteratorBase.h.
References Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_item.
Referenced by Mantid::Geometry::InfoIteratorBase< T, InfoItem >::distance_to(), and Mantid::Geometry::InfoIteratorBase< T, InfoItem >::equal().
|
inlineprivate |
Definition at line 52 of file InfoIteratorBase.h.
References Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_item, and Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_totalSize.
|
inlineprivate |
Definition at line 66 of file InfoIteratorBase.h.
References index, and Mantid::Geometry::InfoIteratorBase< T, InfoItem >::m_item.
|
friend |
Definition at line 43 of file InfoIteratorBase.h.
|
private |
Definition at line 74 of file InfoIteratorBase.h.
Referenced by Mantid::Geometry::InfoIteratorBase< T, InfoItem >::advance(), Mantid::Geometry::InfoIteratorBase< T, InfoItem >::decrement(), Mantid::Geometry::InfoIteratorBase< T, InfoItem >::dereference(), Mantid::Geometry::InfoIteratorBase< T, InfoItem >::getIndex(), Mantid::Geometry::InfoIteratorBase< T, InfoItem >::increment(), and Mantid::Geometry::InfoIteratorBase< T, InfoItem >::setIndex().
|
private |
Definition at line 75 of file InfoIteratorBase.h.
Referenced by Mantid::Geometry::InfoIteratorBase< T, InfoItem >::advance(), and Mantid::Geometry::InfoIteratorBase< T, InfoItem >::increment().