|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
STL-compatible mutable iterator adapter for Aleph containers. More...
#include <ah-iterator.H>
Public Types | |
| using | T = typename SetType::Item_Type |
| using | Itor = typename SetType::Iterator |
| using | iterator_category = std::forward_iterator_tag |
| using | iterator_concept = std::forward_iterator_tag |
| using | difference_type = std::ptrdiff_t |
| using | reference = decltype(std::declval< const Itor & >().get_curr()) |
| using | pointer = std::add_pointer_t< std::remove_reference_t< reference > > |
| using | value_type = T |
Public Member Functions | |
| StlIterator () noexcept=default | |
| Default constructor creates an "end" iterator (no current element). | |
| StlIterator & | operator++ () |
| Pre-increment: advance to the next element. | |
| StlIterator | operator++ (int) |
| Post-increment: advance to the next element and return the old iterator. | |
| bool | operator== (const StlIterator &it) const |
| Equality compares positions when both iterators are valid; otherwise both must be in the end state. | |
| bool | operator!= (const StlIterator &it) const |
| Inequality. | |
| reference | operator* () const |
| Dereference: return the current element. | |
| pointer | operator-> () const |
| Member access to the current element. | |
Static Public Member Functions | |
| static StlIterator | begin (SetType &s) |
| Create an iterator positioned at the first element of the container. | |
| static StlIterator | end (SetType &s) |
| Create an end iterator for the container. | |
STL-compatible mutable iterator adapter for Aleph containers.
This adapter wraps an Aleph-style iterator (SetType::Iterator) and exposes the operations expected by the STL and C++20 ranges.
| SetType | Aleph container type. |
SetType::Iterator:SetType&.bool has_curr() const.void next().auto & get_curr() const returning the current element.auto get_pos() const returning a position that is stable and comparable between iterators over the same container.void end() to move the iterator to the end sentinel. Definition at line 69 of file ah-iterator.H.
| using StlIterator< SetType >::difference_type = std::ptrdiff_t |
Definition at line 76 of file ah-iterator.H.
| using StlIterator< SetType >::iterator_category = std::forward_iterator_tag |
Definition at line 73 of file ah-iterator.H.
| using StlIterator< SetType >::iterator_concept = std::forward_iterator_tag |
Definition at line 74 of file ah-iterator.H.
| using StlIterator< SetType >::Itor = typename SetType::Iterator |
Definition at line 72 of file ah-iterator.H.
| using StlIterator< SetType >::pointer = std::add_pointer_t<std::remove_reference_t<reference> > |
Definition at line 80 of file ah-iterator.H.
| using StlIterator< SetType >::reference = decltype(std::declval<const Itor &>().get_curr()) |
Definition at line 78 of file ah-iterator.H.
| using StlIterator< SetType >::T = typename SetType::Item_Type |
Definition at line 71 of file ah-iterator.H.
| using StlIterator< SetType >::value_type = T |
Definition at line 82 of file ah-iterator.H.
|
defaultnoexcept |
Default constructor creates an "end" iterator (no current element).
Referenced by StlIterator< SetType >::begin().
|
inlinestatic |
Create an iterator positioned at the first element of the container.
Definition at line 139 of file ah-iterator.H.
References StlIterator< SetType >::StlIterator().
Referenced by StlAlephIterator< SetName >::begin(), TEST_F(), TEST_F(), and TEST_F().
|
inlinestatic |
Create an end iterator for the container.
Definition at line 145 of file ah-iterator.H.
Referenced by StlAlephIterator< SetName >::end().
|
inline |
Inequality.
Definition at line 125 of file ah-iterator.H.
|
inline |
Dereference: return the current element.
Definition at line 133 of file ah-iterator.H.
|
inline |
Pre-increment: advance to the next element.
Definition at line 90 of file ah-iterator.H.
|
inline |
Post-increment: advance to the next element and return the old iterator.
Definition at line 97 of file ah-iterator.H.
|
inline |
Member access to the current element.
Definition at line 136 of file ah-iterator.H.
|
inline |
Equality compares positions when both iterators are valid; otherwise both must be in the end state.
Definition at line 106 of file ah-iterator.H.