ITK  5.2.0
Insight Toolkit
Classes | Public Types | Public Member Functions | List of all members
itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator Class Referencefinal

#include <itkIndexRange.h>

Classes

struct  ZeroIndex
 

Public Types

using difference_type = std::ptrdiff_t
 
using iterator_category = std::bidirectional_iterator_tag
 
using pointer = const IndexType *
 
using reference = const IndexType &
 
using value_type = IndexType
 

Public Member Functions

 const_iterator ()=default
 
reference operator* () const noexcept
 
pointer operator-> () const noexcept
 
using MinIndexType = typename std::conditional< VBeginAtZero, ZeroIndex, IndexType >::type
 
class IndexRange
 
bool operator== (const const_iterator &lhs, const const_iterator &rhs) noexcept
 
bool operator!= (const const_iterator &lhs, const const_iterator &rhs) noexcept
 
bool operator< (const const_iterator &lhs, const const_iterator &rhs) noexcept
 
bool operator> (const const_iterator &lhs, const const_iterator &rhs) noexcept
 
bool operator<= (const const_iterator &lhs, const const_iterator &rhs) noexcept
 
bool operator>= (const const_iterator &lhs, const const_iterator &rhs) noexcept
 
IndexType m_Index
 
MinIndexType m_MinIndex
 
IndexType m_MaxIndex
 
const_iteratoroperator++ () noexcept
 
const_iterator operator++ (int) noexcept
 
const_iteratoroperator-- () noexcept
 
const_iterator operator-- (int) noexcept
 
 const_iterator (const IndexType &index, const MinIndexType &minIndex, const IndexType &maxIndex) noexcept
 

Detailed Description

template<unsigned VDimension, bool VBeginAtZero>
class itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator

Definition at line 87 of file itkIndexRange.h.

Member Typedef Documentation

◆ difference_type

template<unsigned VDimension, bool VBeginAtZero>
using itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::difference_type = std::ptrdiff_t

Definition at line 91 of file itkIndexRange.h.

◆ iterator_category

template<unsigned VDimension, bool VBeginAtZero>
using itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::iterator_category = std::bidirectional_iterator_tag

Definition at line 95 of file itkIndexRange.h.

◆ MinIndexType

template<unsigned VDimension, bool VBeginAtZero>
using itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::MinIndexType = typename std::conditional<VBeginAtZero, ZeroIndex, IndexType>::type
private

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 268 of file itkIndexRange.h.

◆ pointer

template<unsigned VDimension, bool VBeginAtZero>
using itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::pointer = const IndexType *

Definition at line 94 of file itkIndexRange.h.

◆ reference

template<unsigned VDimension, bool VBeginAtZero>
using itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::reference = const IndexType &

Definition at line 93 of file itkIndexRange.h.

◆ value_type

template<unsigned VDimension, bool VBeginAtZero>
using itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::value_type = IndexType

Definition at line 92 of file itkIndexRange.h.

Constructor & Destructor Documentation

◆ const_iterator() [1/2]

template<unsigned VDimension, bool VBeginAtZero>
itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::const_iterator ( )
default

Default-constructor, as required for any C++11 Forward Iterator.

Note
The other five "special member functions" (copy-constructor, copy-assignment operator, move-constructor, move-assignment operator, and destructor) are defaulted implicitly, following the C++ "Rule of Zero".

◆ const_iterator() [2/2]

template<unsigned VDimension, bool VBeginAtZero>
itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::const_iterator ( const IndexType index,
const MinIndexType minIndex,
const IndexType maxIndex 
)
inlineprivatenoexcept

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 271 of file itkIndexRange.h.

Member Function Documentation

◆ operator*()

template<unsigned VDimension, bool VBeginAtZero>
reference itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator* ( ) const
inlinenoexcept

Returns a reference to the current index.

Definition at line 106 of file itkIndexRange.h.

References itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::m_Index.

◆ operator++() [1/2]

template<unsigned VDimension, bool VBeginAtZero>
const_iterator& itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator++ ( )
inlinenoexcept

◆ operator++() [2/2]

template<unsigned VDimension, bool VBeginAtZero>
const_iterator itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator++ ( int  )
inlinenoexcept

Postfix increment ('it++').

Note
Usually prefix increment ('++it') is preferable.

Definition at line 139 of file itkIndexRange.h.

◆ operator--() [1/2]

template<unsigned VDimension, bool VBeginAtZero>
const_iterator& itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator-- ( )
inlinenoexcept

◆ operator--() [2/2]

template<unsigned VDimension, bool VBeginAtZero>
const_iterator itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator-- ( int  )
inlinenoexcept

Postfix increment ('it–').

Note
Usually prefix increment ('–it') is preferable.

Definition at line 173 of file itkIndexRange.h.

◆ operator->()

template<unsigned VDimension, bool VBeginAtZero>
pointer itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator-> ( ) const
inlinenoexcept

Returns a pointer to the current index.

Definition at line 110 of file itkIndexRange.h.

Friends And Related Function Documentation

◆ IndexRange

template<unsigned VDimension, bool VBeginAtZero>
friend class IndexRange
friend

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 253 of file itkIndexRange.h.

◆ operator!=

template<unsigned VDimension, bool VBeginAtZero>
bool operator!= ( const const_iterator lhs,
const const_iterator rhs 
)
friend

Returns (it1 != it2) for iterators it1 and it2.

Definition at line 196 of file itkIndexRange.h.

◆ operator<

template<unsigned VDimension, bool VBeginAtZero>
bool operator< ( const const_iterator lhs,
const const_iterator rhs 
)
friend

Returns (it1 < it2) for iterators it1 and it2.

Definition at line 205 of file itkIndexRange.h.

◆ operator<=

template<unsigned VDimension, bool VBeginAtZero>
bool operator<= ( const const_iterator lhs,
const const_iterator rhs 
)
friend

Returns (it1 <= it2) for iterators it1 and it2.

Definition at line 236 of file itkIndexRange.h.

◆ operator==

template<unsigned VDimension, bool VBeginAtZero>
bool operator== ( const const_iterator lhs,
const const_iterator rhs 
)
friend

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 186 of file itkIndexRange.h.

◆ operator>

template<unsigned VDimension, bool VBeginAtZero>
bool operator> ( const const_iterator lhs,
const const_iterator rhs 
)
friend

Returns (it1 > it2) for iterators it1 and it2.

Definition at line 227 of file itkIndexRange.h.

◆ operator>=

template<unsigned VDimension, bool VBeginAtZero>
bool operator>= ( const const_iterator lhs,
const const_iterator rhs 
)
friend

Returns (it1 >= it2) for iterators it1 and it2.

Definition at line 245 of file itkIndexRange.h.

Member Data Documentation

◆ m_Index

template<unsigned VDimension, bool VBeginAtZero>
IndexType itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::m_Index
private

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 284 of file itkIndexRange.h.

Referenced by itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator*(), itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator++(), and itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator--().

◆ m_MaxIndex

template<unsigned VDimension, bool VBeginAtZero>
IndexType itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::m_MaxIndex
private

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 290 of file itkIndexRange.h.

Referenced by itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator++(), and itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator--().

◆ m_MinIndex

template<unsigned VDimension, bool VBeginAtZero>
MinIndexType itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::m_MinIndex
private

Returns (it1 == it2) for iterators it1 and it2. Note that these iterators should be from the same range. This operator does not support comparing iterators from different ranges.

Definition at line 287 of file itkIndexRange.h.

Referenced by itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator++(), and itk::Experimental::IndexRange< VDimension, VBeginAtZero >::const_iterator::operator--().


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