|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Singly linked handle to list nodes. More...
#include <slink.H>
Public Member Functions | |
| Slink () | |
| Default constructor. | |
| void | reset () noexcept |
| Reset the link so it points to itself. | |
| constexpr bool | is_empty () const noexcept |
| Return true if this link is empty (points to itself). | |
| constexpr Slink *& | get_next () noexcept |
| Return the next link. | |
| constexpr const Slink * | get_next () const noexcept |
| Return the next link (const overload). | |
| void | insert_next (Slink *p) |
Insert link p right after this. | |
| Slink * | remove_next () |
Remove the link right after this. | |
Protected Attributes | |
| Slink * | next |
Singly linked handle to list nodes.
Slink models a pointer to a node inside a singly linked list.
Return the next link.
Definition at line 84 of file slink.H.
References next.
Referenced by Aleph::Slist< T >::get_first(), Aleph::Slist< T >::get_first_ne(), Aleph::Snode< T >::get_next(), Aleph::Snode< T >::get_next(), TEST(), TEST(), and TEST().
Insert link p right after this.
insert_next(p) inserts the single link p after the node whose link is this.
| [in] | p | single link to insert |
Definition at line 102 of file slink.H.
References is_empty(), Aleph::maps(), and next.
Referenced by Aleph::Slist< T >::insert_first(), TEST(), and TEST().
Return true if this link is empty (points to itself).
Definition at line 78 of file slink.H.
References next.
Referenced by Aleph::DynSlist< T >::clear(), Aleph::Slist< T >::get_first(), Aleph::Slist< T >::get_first(), Aleph::Slist< T >::insert_first(), insert_next(), Aleph::Slist< T >::remove_first(), remove_next(), Aleph::Slist< T >::Iterator::reset_first(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inline |
Remove the link right after this.
remove_next() removes the next single link and returns its address.
Definition at line 118 of file slink.H.
References is_empty(), Aleph::maps(), next, and Aleph::HTList::reset().
Referenced by Aleph::Snode< T >::remove_next(), TEST(), and TEST().
|
inlinenoexcept |
|
protected |
Definition at line 65 of file slink.H.
Referenced by get_next(), get_next(), insert_next(), is_empty(), remove_next(), and reset().