Volume Cartographer 2.27.0
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
volcart::Range2DIterable< T, > Class Template Reference

Provides an iterable range of 2D number pairs with optional step size. More...

#include <vc/core/util/Iteration.hpp>

Classes

class  Counting2DIterator
 

Public Types

using iterator = Counting2DIterator< T >
 
using const_iterator = Counting2DIterator< T const & >
 

Public Member Functions

 Range2DIterable (T vStart, T vEnd, T uStart, T uEnd, T step)
 
iterator begin () const
 
iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
template<typename Q = T>
std::enable_if_t< std::is_floating_point< Q >::value, std::size_t > size () const
 
template<typename Q = T>
std::enable_if_t< std::is_integral< Q >::value, std::size_t > size () const
 

Private Attributes

vStart_ {0}
 
vEnd_ {0}
 
uStart_ {0}
 
uEnd_ {0}
 
step_ {1}
 

Detailed Description

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

Provides an iterable range of 2D number pairs with optional step size.

Convenience class for generating range-based for loops over 2D values. Note that this class only returns values and const references.

Template Parameters
TIntegral or floating-point type

Definition at line 194 of file Iteration.hpp.

Member Typedef Documentation

◆ const_iterator

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
using volcart::Range2DIterable< T, >::const_iterator = Counting2DIterator<T const&>

Const iterator type

Definition at line 267 of file Iteration.hpp.

◆ iterator

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
using volcart::Range2DIterable< T, >::iterator = Counting2DIterator<T>

Iterator type

Definition at line 265 of file Iteration.hpp.

Constructor & Destructor Documentation

◆ Range2DIterable()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
volcart::Range2DIterable< T, >::Range2DIterable ( vStart,
vEnd,
uStart,
uEnd,
step 
)
inline

Construct a new range

Definition at line 270 of file Iteration.hpp.

Member Function Documentation

◆ begin()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
iterator volcart::Range2DIterable< T, >::begin ( ) const
inline

Return the start of the range

Definition at line 283 of file Iteration.hpp.

◆ cbegin()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
const_iterator volcart::Range2DIterable< T, >::cbegin ( ) const
inline

Return the const start of the range

Definition at line 290 of file Iteration.hpp.

◆ cend()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
const_iterator volcart::Range2DIterable< T, >::cend ( ) const
inline

Return the const end of the range

Definition at line 295 of file Iteration.hpp.

◆ end()

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
iterator volcart::Range2DIterable< T, >::end ( ) const
inline

Return the end of the range

Definition at line 288 of file Iteration.hpp.

◆ size() [1/2]

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename Q = T>
std::enable_if_t< std::is_floating_point< Q >::value, std::size_t > volcart::Range2DIterable< T, >::size ( ) const
inline

Returns the size of the range (floating point ranges)

Definition at line 302 of file Iteration.hpp.

◆ size() [2/2]

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
template<typename Q = T>
std::enable_if_t< std::is_integral< Q >::value, std::size_t > volcart::Range2DIterable< T, >::size ( ) const
inline

Returns the size of the range (integral ranges)

Definition at line 312 of file Iteration.hpp.

Member Data Documentation

◆ step_

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

Loop step size

Definition at line 328 of file Iteration.hpp.

◆ uEnd_

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
T volcart::Range2DIterable< T, >::uEnd_ {0}
private

Inner loop limit

Definition at line 326 of file Iteration.hpp.

◆ uStart_

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
T volcart::Range2DIterable< T, >::uStart_ {0}
private

Inner loop starting value

Definition at line 324 of file Iteration.hpp.

◆ vEnd_

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
T volcart::Range2DIterable< T, >::vEnd_ {0}
private

Outer loop limit

Definition at line 322 of file Iteration.hpp.

◆ vStart_

template<typename T , std::enable_if_t< std::is_arithmetic< T >::value, int > = 0>
T volcart::Range2DIterable< T, >::vStart_ {0}
private

Outer loop starting value

Definition at line 320 of file Iteration.hpp.


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