Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::EnumZipIterator< C > Class Template Reference

#include <ah-zip.H>

Inheritance diagram for Aleph::EnumZipIterator< C >:
[legend]
Collaboration diagram for Aleph::EnumZipIterator< C >:
[legend]

Public Types

using T = std::decay_t< typename C::Item_Type >
 

Public Member Functions

void next ()
 Advance the iterator and increment the associated index (bounds-checked).
 
void next_ne () noexcept
 Advance the iterator and increment the associated index (no-throw variant).
 
 EnumZipIterator (const C &c)
 Construct an enumerating iterator over a single container.
 
std::tuple< T, size_tget_curr () const
 Return the current tuple (value, index) (bounds-checked).
 
std::tuple< T, size_tget_curr_ne () const noexcept
 Return the current tuple (value, index) (no-throw variant).
 
bool completed () const noexcept
 Return true if the underlying iterator has reached the end.
 

Private Attributes

size_t i = 0
 

Detailed Description

template<class C>
class Aleph::EnumZipIterator< C >

Definition at line 1237 of file ah-zip.H.

Member Typedef Documentation

◆ T

template<class C >
using Aleph::EnumZipIterator< C >::T = std::decay_t<typename C::Item_Type>

Definition at line 1260 of file ah-zip.H.

Constructor & Destructor Documentation

◆ EnumZipIterator()

template<class C >
Aleph::EnumZipIterator< C >::EnumZipIterator ( const C &  c)
inline

Construct an enumerating iterator over a single container.

Parameters
[in]cContainer to iterate.

Definition at line 1266 of file ah-zip.H.

Member Function Documentation

◆ completed()

template<class C >
bool Aleph::EnumZipIterator< C >::completed ( ) const
inlinenoexcept

Return true if the underlying iterator has reached the end.

Definition at line 1284 of file ah-zip.H.

References Aleph::has_curr(), and Aleph::maps().

◆ get_curr()

template<class C >
std::tuple< T, size_t > Aleph::EnumZipIterator< C >::get_curr ( ) const
inline

Return the current tuple (value, index) (bounds-checked).

Definition at line 1269 of file ah-zip.H.

◆ get_curr_ne()

template<class C >
std::tuple< T, size_t > Aleph::EnumZipIterator< C >::get_curr_ne ( ) const
inlinenoexcept

Return the current tuple (value, index) (no-throw variant).

Requires has_curr().

Definition at line 1278 of file ah-zip.H.

◆ next()

template<class C >
void Aleph::EnumZipIterator< C >::next ( )
inline

Advance the iterator and increment the associated index (bounds-checked).

Definition at line 1244 of file ah-zip.H.

◆ next_ne()

template<class C >
void Aleph::EnumZipIterator< C >::next_ne ( )
inlinenoexcept

Advance the iterator and increment the associated index (no-throw variant).

Requires has_curr().

Definition at line 1254 of file ah-zip.H.

Member Data Documentation

◆ i

template<class C >
size_t Aleph::EnumZipIterator< C >::i = 0
private

Definition at line 1239 of file ah-zip.H.


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