Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::uni_zip_detail::AlephIteratorWrapper< Container > Class Template Reference

Wrapper that provides a uniform interface for Aleph iterators. More...

#include <ah-zip-utils.H>

Collaboration diagram for Aleph::uni_zip_detail::AlephIteratorWrapper< Container >:
[legend]

Public Types

using value_type = std::decay_t< typename std::decay_t< Container >::Item_Type >
 

Public Member Functions

 AlephIteratorWrapper (const Container &c)
 Constructor initializing from container.
 
bool has_curr () const noexcept
 Check if iterator has a current element.
 
bool completed () const noexcept
 Check if iterator has reached the end.
 
auto get_curr () const
 Get the current element.
 
void next ()
 Advance to the next element.
 
void next_ne ()
 Advance without checking; same as next(), which does not check.
 

Private Attributes

Aleph::const_iterator_t< std::decay_t< Container > > it_
 

Detailed Description

template<typename Container>
class Aleph::uni_zip_detail::AlephIteratorWrapper< Container >

Wrapper that provides a uniform interface for Aleph iterators.

This wrapper adapts Aleph-style iterable containers (which use internal Iterator classes with has_curr(), get_curr(), next_ne()) to a uniform interface used internally by UniZipIterator.

Template Parameters
ContainerThe type of the Aleph-compatible container.
Author
Leandro Rabindranath Leon

Definition at line 212 of file ah-zip-utils.H.

Member Typedef Documentation

◆ value_type

template<typename Container >
using Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::value_type = std::decay_t<typename std::decay_t<Container>::Item_Type>

Definition at line 219 of file ah-zip-utils.H.

Constructor & Destructor Documentation

◆ AlephIteratorWrapper()

template<typename Container >
Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::AlephIteratorWrapper ( const Container &  c)
inlineexplicit

Constructor initializing from container.

Definition at line 222 of file ah-zip-utils.H.

Member Function Documentation

◆ completed()

template<typename Container >
bool Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::completed ( ) const
inlinenoexcept

Check if iterator has reached the end.

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

References Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::it_.

◆ get_curr()

template<typename Container >
auto Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::get_curr ( ) const
inline

Get the current element.

Get the current element

Definition at line 238 of file ah-zip-utils.H.

References Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::it_.

◆ has_curr()

template<typename Container >
bool Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::has_curr ( ) const
inlinenoexcept

Check if iterator has a current element.

Definition at line 225 of file ah-zip-utils.H.

References Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::it_.

◆ next()

template<typename Container >
void Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::next ( )
inline

Advance to the next element.

Advance all iterators

Definition at line 245 of file ah-zip-utils.H.

References Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::it_.

Referenced by Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::next_ne().

◆ next_ne()

template<typename Container >
void Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::next_ne ( )
inline

Advance without checking; same as next(), which does not check.

Provided so the adaptor satisfies AlephIterator and works in generic code that advances with next_ne() under a has_curr() guard.

Definition at line 255 of file ah-zip-utils.H.

References Aleph::uni_zip_detail::AlephIteratorWrapper< Container >::next().

Member Data Documentation

◆ it_


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