|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Singly linked list node (non-circular). More...
#include <slink_nc.H>
Classes | |
| class | Iterator |
Public Member Functions | |
| Slink_Nc () | |
| Empty constructor. | |
| Slink_Nc (const Slink_Nc &) | |
| Copy constructor; sets the next link to nullptr. | |
| ~Slink_Nc () | |
| Slink_Nc & | operator= (const Slink_Nc &link) |
| Assignment; sets the next link to nullptr. | |
| void | reset () |
| Resets the link to nullptr. | |
| bool | is_empty () const |
| Returns true if this is empty (points to nullptr). | |
| Slink_Nc *& | get_next () |
| Returns the next link. | |
| const Slink_Nc * | get_next () const |
| Returns the next link (constant version). | |
| void | insert (Slink_Nc *p) |
| Inserts link p after this. | |
| Slink_Nc * | remove_next () |
| Removes the link following this. | |
Protected Attributes | |
| Slink_Nc * | next |
Singly linked list node (non-circular).
Slink_Nc models a pointer to a node within a non-circular singly linked list.
Definition at line 55 of file slink_nc.H.
|
inline |
Empty constructor.
Definition at line 62 of file slink_nc.H.
Copy constructor; sets the next link to nullptr.
Definition at line 65 of file slink_nc.H.
|
inline |
Definition at line 67 of file slink_nc.H.
|
inline |
Returns the next link.
Definition at line 97 of file slink_nc.H.
References Aleph::divide_and_conquer_partition_dp(), and next.
Referenced by Aleph::Snode_Nc< T >::get_next(), Aleph::Snode_Nc< T >::get_next(), Aleph::Slink_Nc::Iterator::next_ne(), Aleph::Slink_Nc::Iterator::reset(), and Aleph::Slink_Nc::Iterator::reset_first().
Returns the next link (constant version).
| none |
Definition at line 107 of file slink_nc.H.
References Aleph::divide_and_conquer_partition_dp(), and next.
Inserts link p after this.
insert(p) inserts a simple node whose link is p after the node whose link is this.
| [in] | p | the simple link to insert. |
Definition at line 120 of file slink_nc.H.
References Aleph::divide_and_conquer_partition_dp(), is_empty(), and next.
Referenced by Aleph::Dyn_Slist_Nc< T >::append(), and Aleph::Dyn_Slist_Nc< T >::insert().
|
inline |
Returns true if this is empty (points to nullptr).
Definition at line 90 of file slink_nc.H.
References Aleph::divide_and_conquer_partition_dp(), and next.
Referenced by Aleph::Dyn_Slist_Nc< T >::empty(), Aleph::Dyn_Slist_Nc< T >::get_first(), Aleph::Dyn_Slist_Nc< T >::get_first(), Aleph::Dyn_Slist_Nc< T >::get_last(), Aleph::Dyn_Slist_Nc< T >::get_last(), insert(), Aleph::Dyn_Slist_Nc< T >::operator=(), operator=(), and Aleph::Dyn_Slist_Nc< T >::remove_first().
Assignment; sets the next link to nullptr.
Definition at line 70 of file slink_nc.H.
References ah_invalid_argument_if, Aleph::divide_and_conquer_partition_dp(), is_empty(), and next.
|
inline |
Removes the link following this.
remove_next() removes the simple node situated after the node whose link is this and returns the address of the removed link.
Definition at line 137 of file slink_nc.H.
References Aleph::divide_and_conquer_partition_dp(), next, and reset().
Referenced by Aleph::Snode_Nc< T >::remove_next().
|
inline |
Resets the link to nullptr.
Definition at line 83 of file slink_nc.H.
References Aleph::divide_and_conquer_partition_dp(), and next.
Referenced by Aleph::Dyn_Slist_Nc< T >::empty(), and remove_next().
|
protected |
Definition at line 58 of file slink_nc.H.
Referenced by get_next(), get_next(), insert(), is_empty(), Aleph::Slink_Nc::Iterator::is_in_first(), operator=(), remove_next(), and reset().