Volume Cartographer 2.27.0
Public Member Functions | Private Attributes | List of all members
volcart::RangeIterable< T, >::CountingIterator< ItT > Class Template Reference

Public Types

using difference_type = std::size_t
 
using value_type = ItT
 
using pointer = value_type *
 
using reference = value_type const &
 
using iterator_category = std::input_iterator_tag
 

Public Member Functions

 CountingIterator (ItT value, ItT maxValue, ItT step)
 
reference operator* () const
 
bool operator== (const CountingIterator &other) const
 
bool operator!= (const CountingIterator &other) const
 
CountingIteratoroperator++ ()
 

Private Attributes

ItT value_ {0}
 
ItT maxValue_ {1}
 
ItT step_ {1}
 

Detailed Description

template<typename T, std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT>
class volcart::RangeIterable< T, >::CountingIterator< ItT >

Definition at line 28 of file Iteration.hpp.

Member Typedef Documentation

◆ difference_type

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
using volcart::RangeIterable< T, >::CountingIterator< ItT >::difference_type = std::size_t

Iterator type traits

Definition at line 40 of file Iteration.hpp.

◆ iterator_category

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
using volcart::RangeIterable< T, >::CountingIterator< ItT >::iterator_category = std::input_iterator_tag

Definition at line 44 of file Iteration.hpp.

◆ pointer

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
using volcart::RangeIterable< T, >::CountingIterator< ItT >::pointer = value_type*

Definition at line 42 of file Iteration.hpp.

◆ reference

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
using volcart::RangeIterable< T, >::CountingIterator< ItT >::reference = value_type const&

Definition at line 43 of file Iteration.hpp.

◆ value_type

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
using volcart::RangeIterable< T, >::CountingIterator< ItT >::value_type = ItT

Definition at line 41 of file Iteration.hpp.

Constructor & Destructor Documentation

◆ CountingIterator()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
volcart::RangeIterable< T, >::CountingIterator< ItT >::CountingIterator ( ItT  value,
ItT  maxValue,
ItT  step 
)
inlineexplicit

Construct with starting value and step size

Definition at line 48 of file Iteration.hpp.

Member Function Documentation

◆ operator!=()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
bool volcart::RangeIterable< T, >::CountingIterator< ItT >::operator!= ( const CountingIterator< ItT > &  other) const
inline

Inequality comparison

Definition at line 63 of file Iteration.hpp.

◆ operator*()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
reference volcart::RangeIterable< T, >::CountingIterator< ItT >::operator* ( ) const
inline

Get the current value

Definition at line 54 of file Iteration.hpp.

◆ operator++()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
CountingIterator & volcart::RangeIterable< T, >::CountingIterator< ItT >::operator++ ( )
inline

Increment operator

Definition at line 69 of file Iteration.hpp.

◆ operator==()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
bool volcart::RangeIterable< T, >::CountingIterator< ItT >::operator== ( const CountingIterator< ItT > &  other) const
inline

Equality comparison

Definition at line 57 of file Iteration.hpp.

Member Data Documentation

◆ maxValue_

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
ItT volcart::RangeIterable< T, >::CountingIterator< ItT >::maxValue_ {1}
private

Max iterator value

Definition at line 34 of file Iteration.hpp.

◆ step_

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
ItT volcart::RangeIterable< T, >::CountingIterator< ItT >::step_ {1}
private

Step size

Definition at line 36 of file Iteration.hpp.

◆ value_

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename ItT >
ItT volcart::RangeIterable< T, >::CountingIterator< ItT >::value_ {0}
private

Current iterator value

Definition at line 32 of file Iteration.hpp.


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