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

#include <ah-zip.H>

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

Public Types

using T = std::decay_t< typename C::Item_Type >
 
using Tuple_Type = std::tuple< T >
 The tuple type returned by get_curr() and get_curr_ne()
 
using Item_Type = T
 Type of elements from the container.
 

Public Member Functions

 ZipIterator (const C &c)
 Construct a zip iterator over a single container.
 
std::tuple< Tget_curr () const
 Return the current tuple (bounds-checked).
 
std::tuple< Tget_curr_ne () const noexcept
 Return the current tuple (no-throw variant).
 
DynList< Tget_curr_list () const
 
bool completed () const noexcept
 Return true if the underlying iterator has reached the end.
 

Detailed Description

template<class C>
class Aleph::ZipIterator< C >

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

Member Typedef Documentation

◆ Item_Type

template<class C >
using Aleph::ZipIterator< C >::Item_Type = T

Type of elements from the container.

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

◆ T

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

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

◆ Tuple_Type

template<class C >
using Aleph::ZipIterator< C >::Tuple_Type = std::tuple<T>

The tuple type returned by get_curr() and get_curr_ne()

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

Constructor & Destructor Documentation

◆ ZipIterator()

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

Construct a zip iterator over a single container.

This is mainly used as the base case for the recursive ZipIterator.

Parameters
[in]cContainer to iterate.

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

Member Function Documentation

◆ completed()

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

Return true if the underlying iterator has reached the end.

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

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

◆ get_curr()

template<class C >
std::tuple< T > Aleph::ZipIterator< C >::get_curr ( ) const
inline

Return the current tuple (bounds-checked).

Exceptions
std::overflow_errorif the iterator is past the end.

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

◆ get_curr_list()

template<class C >
DynList< T > Aleph::ZipIterator< C >::get_curr_list ( ) const
inline

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

References Aleph::DynList< T >::append(), and l.

◆ get_curr_ne()

template<class C >
std::tuple< T > Aleph::ZipIterator< C >::get_curr_ne ( ) const
inlinenoexcept

Return the current tuple (no-throw variant).

Requires has_curr().

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


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