ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
Acts::IMultiAxis::iterator Class Reference

Random-access iterator over the contained axes. More...

#include <Acts/Utilities/IMultiAxis.hpp>

Public Types

using difference_type = std::ptrdiff_t
 The type used to represent the distance between two iterators.
using iterator_category = std::random_access_iterator_tag
 The iterator category (random-access).
using iterator_concept = std::random_access_iterator_tag
 The iterator concept (random-access).
using pointer = const IAxis*
 The pointer type of the values the iterator points to.
using reference = const IAxis&
 The reference type of the values the iterator points to.
using value_type = const IAxis
 The type of the values the iterator points to.

Public Member Functions

constexpr iterator (const IMultiAxis &multiAxis, std::size_t index) noexcept
 Construct an iterator pointing at the given axis dimension.
constexpr reference operator* () const
 Dereference the iterator.
constexpr iterator & operator++ () noexcept
 Pre-increment the iterator.
constexpr iterator operator++ (int) noexcept
 Post-increment the iterator.
constexpr iterator & operator+= (difference_type n) noexcept
 Advance the iterator by n positions.
constexpr iterator & operator-- () noexcept
 Pre-decrement the iterator.
constexpr iterator operator-- (int) noexcept
 Post-decrement the iterator.
constexpr iterator & operator-= (difference_type n) noexcept
 Move the iterator back by n positions.

Detailed Description

Random-access iterator over the contained axes.

Dereferencing yields a const reference to the IAxis at the current dimension.

Constructor & Destructor Documentation

◆ iterator()

Acts::IMultiAxis::iterator::iterator ( const IMultiAxis & multiAxis,
std::size_t index )
constexprnoexcept

Construct an iterator pointing at the given axis dimension.

Parameters
multiAxisthe multi-axis to iterate over
indexthe axis dimension to point at

Member Function Documentation

◆ operator*()

reference Acts::IMultiAxis::iterator::operator* ( ) const
constexpr

Dereference the iterator.

Returns
a const reference to the axis at the current dimension

◆ operator++() [1/2]

iterator & Acts::IMultiAxis::iterator::operator++ ( )
constexprnoexcept

Pre-increment the iterator.

Returns
a reference to the incremented iterator

◆ operator++() [2/2]

iterator Acts::IMultiAxis::iterator::operator++ ( int )
constexprnoexcept

Post-increment the iterator.

Returns
a copy of the iterator before incrementing

◆ operator+=()

iterator & Acts::IMultiAxis::iterator::operator+= ( difference_type n)
constexprnoexcept

Advance the iterator by n positions.

Parameters
nthe number of positions to advance
Returns
a reference to the advanced iterator

◆ operator--() [1/2]

iterator & Acts::IMultiAxis::iterator::operator-- ( )
constexprnoexcept

Pre-decrement the iterator.

Returns
a reference to the decremented iterator

◆ operator--() [2/2]

iterator Acts::IMultiAxis::iterator::operator-- ( int )
constexprnoexcept

Post-decrement the iterator.

Returns
a copy of the iterator before decrementing

◆ operator-=()

iterator & Acts::IMultiAxis::iterator::operator-= ( difference_type n)
constexprnoexcept

Move the iterator back by n positions.

Parameters
nthe number of positions to move back
Returns
a reference to the moved iterator