|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Iterator on the items of list. More...
#include <htlist.H>
Public Types | |
| using | Item_Type = T |
| using | Iterator_Type = Iterator |
| The type of elements of list. | |
| using | Set_Type = DynList |
Public Member Functions | |
| Iterator () noexcept=default | |
| The type of container. | |
| Iterator (DynList &list) noexcept | |
Iterator on the modifiable list list. | |
| Iterator (const DynList &)=delete | |
| A constant list is iterated through Const_Iterator. | |
| T & | get_curr_ne () const noexcept |
| Return the current link guaranteeing no exception. Be careful. | |
| T & | get_curr () const |
| Return the current item. | |
| T | del () |
| Remove the current item of the iterator. | |
| Slinknc * | del_ne () noexcept |
| Remove the current node, which the caller takes, and move the iterator forward; the iterator must have a current item. | |
Public Member Functions inherited from Aleph::HTList::Iterator | |
| Iterator () noexcept=default | |
| Iterator (const HTList &list) noexcept | |
Initialize iterator on at the first item of list | |
| void | reset () noexcept |
| Reset the iterator at the first item. | |
| long | get_pos () const noexcept |
| void | reset_first () noexcept |
See reset(). | |
| void | reset_last () |
| It has O(n) of performance. | |
| void | end () noexcept |
| Set the iterator to its end position, which has not. | |
| Iterator (const Iterator &)=default | |
| Iterator & | operator= (const Iterator &it) noexcept |
| bool | has_curr () const noexcept |
| bool | is_last () const noexcept |
| bool | is_in_first () const noexcept |
Return true if the iterator is positioned on the first item. | |
| bool | is_in_last () const noexcept |
Return true if the iterator is positioned on the last item. | |
| Slinknc * | get_curr () const |
| Slinknc * | get_curr_ne () const noexcept |
| Return the current link guaranteeing no exception. Be careful. | |
| void | next_ne () noexcept |
| Move the iterator one position forward guaranteeing no exception. | |
| void | next () |
| Slinknc * | del_ne () noexcept |
| Remove the current item and move the iterator one position forward, without checking that there is a current item. | |
| Slinknc * | del () |
Private Member Functions | |
| DynList * | list_ptr () const noexcept |
| T | del_whose_move_throws () |
Additional Inherited Members | |
Protected Member Functions inherited from Aleph::HTList::Iterator | |
| HTList * | get_list_ptr () const noexcept |
| The list of the iterator, for the iterators of the derived lists. | |
| using Aleph::DynList< T >::Iterator::Item_Type = T |
| using Aleph::DynList< T >::Iterator::Iterator_Type = Iterator |
| using Aleph::DynList< T >::Iterator::Set_Type = DynList |
|
defaultnoexcept |
The type of container.
|
inlinenoexcept |
|
delete |
A constant list is iterated through Const_Iterator.
|
inline |
Remove the current item of the iterator.
del() removes the current item and advance forward the iterator to the next item. The item moves out before its node leaves, so that if its move throws the list keeps it, and the iterator stays on it.
| overflow_error | if the iterator has not current item |
Definition at line 1695 of file htlist.H.
References ah_overflow_error_if, Aleph::HTList::Iterator::del(), Aleph::DynList< T >::Iterator::del_whose_move_throws(), Aleph::HTList::Iterator::has_curr(), Aleph::DynList< T >::Iterator::list_ptr(), and Aleph::htlist_detail::Item_Count::num_items.
Referenced by TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Remove the current node, which the caller takes, and move the iterator forward; the iterator must have a current item.
Definition at line 1717 of file htlist.H.
References Aleph::HTList::Iterator::del_ne(), Aleph::DynList< T >::Iterator::list_ptr(), and Aleph::htlist_detail::Item_Count::num_items.
Referenced by Aleph::DynList< T >::Iterator::del_whose_move_throws(), and TEST().
|
inlineprivate |
Definition at line 1626 of file htlist.H.
References Aleph::DynList< T >::Iterator::del_ne(), and Aleph::DynList< T >::Iterator::get_curr_ne().
Referenced by Aleph::DynList< T >::Iterator::del().
|
inline |
Return the current item.
| overflow_error | if the iterator has not current item |
Definition at line 1679 of file htlist.H.
References Aleph::HTList::Iterator::get_curr().
Referenced by Aleph::Tarjan_Connected_Components< GT, Itor, SA >::connected_components(), Aleph::graph_dry_detail::curr_ne(), Aleph::dfs_curr(), Aleph::DynList< T >::get(), GraphCommon< GT, Node, Arc >::search_arc(), GraphCommon< GT, Node, Arc >::search_arc(), GraphCommon< GT, Node, Arc >::search_arc(), GraphCommon< GT, Node, Arc >::search_node(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), and TYPED_TEST().
|
inlinenoexcept |
Return the current link guaranteeing no exception. Be careful.
Definition at line 1669 of file htlist.H.
References Aleph::HTList::Iterator::get_curr_ne().
Referenced by Aleph::sort_utils_detail::counting_sort_impl(), Aleph::graph_dry_detail::curr_ne(), Aleph::DynList< T >::Iterator::del_whose_move_throws(), Aleph::dfs_curr(), Aleph::search_extreme(), Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::select_random_node(), TYPED_TEST(), and TYPED_TEST().
|
inlineprivatenoexcept |
Definition at line 1617 of file htlist.H.
References Aleph::HTList::Iterator::get_list_ptr().
Referenced by Aleph::DynList< T >::Iterator::del(), and Aleph::DynList< T >::Iterator::del_ne().