|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Iterator on a list of Dnode objects.
More...
#include <tpl_dnode.H>
Public Types | |
| using | Set_Type = Dnode< T > |
| The type of set. | |
| using | Item_Type = Dnode< T > * |
| The type of element of set. | |
| using | Base = Dlink::Iterator |
Public Types inherited from Aleph::Dlink::Iterator | |
| using | Set_Type = Dlink |
| The set type. | |
| using | Item_Type = Dlink * |
| The type of elements of container. | |
Public Member Functions | |
| Dnode< T > * | get_curr_ne () const noexcept |
| Return the current link guaranteeing no exception. Be careful. | |
| Dnode< T > * | get_curr () const |
| Return a pointer to the current node. | |
| Dnode * | del () |
| Remove the current node of the list a return a pointer to the removed node. | |
| Dnode * | del_ne () noexcept |
| Same as del() but without exception check. | |
Public Member Functions inherited from Aleph::Dlink::Iterator | |
| Iterator (Dlink *head_ptr) noexcept | |
Initialize an iterator on the first item of the list pointed by head_ptr. | |
| Iterator (const Dlink &list) noexcept | |
Initialize an iterator on the first item of list. | |
| void | set (Dlink *new_curr) noexcept |
| Set the current node . | |
| Iterator () noexcept | |
| void | reset_first () noexcept |
| Reset the iterator to the first item of list. | |
| void | reset_last () noexcept |
| Reset the iterator to the last item of list. | |
| void | end () noexcept |
| Put the iterator out of range. | |
| bool | has_curr () const noexcept |
Return true if the iterator has current item. | |
| bool | is_last () const noexcept |
| Dlink * | get_curr_ne () const noexcept |
| Return the current link guaranteeing no exception. Be careful. | |
| Dlink * | get_curr () const |
| Return the current node of iterator. | |
| constexpr bool | is_in_first () const noexcept |
Return true if the iterator is positiones on the first item. | |
| bool | is_in_last () const noexcept |
Return true if the iterator is positiones on the last item. | |
| void | prev_ne () noexcept |
| Move the iterator one position backward guaranteeing no exception. | |
| void | prev () |
| Move the iterator one position backward. | |
| void | next_ne () noexcept |
| Move the iterator one position backward guaranteeing no exception. | |
| void | next () |
| Move the iterator one position forward. | |
| constexpr bool | operator== (const Iterator &it) const noexcept |
Return true if this and it are positioned on the same item. | |
| constexpr bool | operator!= (const Iterator &it) const noexcept |
Return true if this and it hace different states. | |
| Dlink * | del () |
| Remove from the list the current node and move the iterator one position forward. | |
| Dlink * | del_ne () noexcept |
| constexpr bool | verify (Dlink *l) const noexcept |
Return true if the iterator is on the list pointed by l | |
| constexpr bool | verify (const Iterator &it) const noexcept |
Return true if this and it are on the same list. | |
Iterator on a list of Dnode objects.
Definition at line 260 of file tpl_dnode.H.
| using Aleph::Dnode< T >::Iterator::Base = Dlink::Iterator |
Definition at line 270 of file tpl_dnode.H.
The type of element of set.
Definition at line 268 of file tpl_dnode.H.
The type of set.
Definition at line 265 of file tpl_dnode.H.
|
inline |
Remove the current node of the list a return a pointer to the removed node.
The iterator is moved on position forward.
| overflow_error | if the iterator is not positioned on a current node |
Definition at line 298 of file tpl_dnode.H.
References Aleph::Dlink::Iterator::del().
|
inlinenoexcept |
Same as del() but without exception check.
Definition at line 302 of file tpl_dnode.H.
References Aleph::Dlink::Iterator::del_ne().
Return a pointer to the current node.
| overflow_error | if the iterator is not positioned on a current node |
Definition at line 285 of file tpl_dnode.H.
References Aleph::Dlink::Iterator::get_curr().
Referenced by Aleph::DynDlist< T >::Iterator::append(), Aleph::DynDlist< T >::Iterator::append(), Aleph::DynDlist< T >::Iterator::append_list(), Aleph::DynDlist< T >::Iterator::del(), Aleph::DynDlist< T >::Iterator::get_curr(), Aleph::DynDlist< T >::Iterator::insert(), Aleph::DynDlist< T >::Iterator::insert(), and Aleph::DynDlist< T >::Iterator::insert_list().
|
inlinenoexcept |
Return the current link guaranteeing no exception. Be careful.
Definition at line 275 of file tpl_dnode.H.
References Aleph::Dlink::Iterator::get_curr_ne().
Referenced by Aleph::DynDlist< T >::Iterator::get_curr_ne().