|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Wrapper that provides a uniform interface for STL iterators. More...
#include <ah-zip-utils.H>
Public Types | |
| using | value_type = typename std::decay_t< Container >::value_type |
Public Member Functions | |
| StlIteratorWrapper (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 () noexcept |
| Advance to the next element. | |
| void | next_ne () noexcept |
Advance without checking; same as next(), which does not check. | |
Private Attributes | |
| std::decay_t< Container >::const_iterator | curr_ |
| std::decay_t< Container >::const_iterator | end_ |
Wrapper that provides a uniform interface for STL iterators.
This wrapper adapts STL-style iterators (begin(), end(), operator++, operator*) to the Aleph-style iterator interface (has_curr(), get_curr(), next(), etc.).
| Container | The type of the STL-compatible container. |
Definition at line 150 of file ah-zip-utils.H.
| using Aleph::uni_zip_detail::StlIteratorWrapper< Container >::value_type = typename std::decay_t<Container>::value_type |
Definition at line 156 of file ah-zip-utils.H.
|
inlineexplicit |
Constructor initializing from container.
Definition at line 159 of file ah-zip-utils.H.
|
inlinenoexcept |
Check if iterator has reached the end.
Definition at line 168 of file ah-zip-utils.H.
References Aleph::uni_zip_detail::StlIteratorWrapper< Container >::curr_, and Aleph::uni_zip_detail::StlIteratorWrapper< Container >::end_.
|
inline |
Get the current element.
Get the current element
Definition at line 175 of file ah-zip-utils.H.
References Aleph::uni_zip_detail::StlIteratorWrapper< Container >::curr_.
|
inlinenoexcept |
Check if iterator has a current element.
Definition at line 162 of file ah-zip-utils.H.
References Aleph::uni_zip_detail::StlIteratorWrapper< Container >::curr_, and Aleph::uni_zip_detail::StlIteratorWrapper< Container >::end_.
|
inlinenoexcept |
Advance to the next element.
Advance to the next element
Advance all iterators
Definition at line 183 of file ah-zip-utils.H.
References Aleph::uni_zip_detail::StlIteratorWrapper< Container >::curr_.
Referenced by Aleph::uni_zip_detail::StlIteratorWrapper< Container >::next_ne().
|
inlinenoexcept |
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 193 of file ah-zip-utils.H.
References Aleph::uni_zip_detail::StlIteratorWrapper< Container >::next().
|
private |
Definition at line 152 of file ah-zip-utils.H.
Referenced by Aleph::uni_zip_detail::StlIteratorWrapper< Container >::completed(), Aleph::uni_zip_detail::StlIteratorWrapper< Container >::get_curr(), Aleph::uni_zip_detail::StlIteratorWrapper< Container >::has_curr(), and Aleph::uni_zip_detail::StlIteratorWrapper< Container >::next().
|
private |
Definition at line 153 of file ah-zip-utils.H.
Referenced by Aleph::uni_zip_detail::StlIteratorWrapper< Container >::completed(), and Aleph::uni_zip_detail::StlIteratorWrapper< Container >::has_curr().