Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Slink_Nc::Iterator Class Reference

#include <slink_nc.H>

Inheritance diagram for Aleph::Slink_Nc::Iterator:
[legend]
Collaboration diagram for Aleph::Slink_Nc::Iterator:
[legend]

Public Member Functions

 Iterator ()
 
 Iterator (Slink_Nc *head_ptr)
 
 Iterator (Slink_Nc &_head)
 
 Iterator (Slink_Nc *head_ptr, Slink_Nc *curr_ptr)
 
void reset_first ()
 Resets iterator to the first node of the list.
 
void set (Slink_Nc *new_curr)
 
void reset (Slink_Nc *new_head)
 
bool has_curr () const
 
Slink_Ncget_curr_ne () const noexcept
 Returns current node address.
 
Slink_Ncget_curr () const
 
bool is_in_first () const
 Returns true if iterator is on the first element.
 
void next_ne () noexcept
 Advances iterator by one position.
 
void next ()
 
bool operator== (const Iterator &it) const
 Returns true if iterators are on the same element.
 
bool operator!= (const Iterator &it) const
 Returns true if iterators have different states.
 
bool verify (Slink_Nc *l) const
 
bool verify (const Iterator &it) const
 

Private Attributes

Slink_Nchead
 
Slink_Nccurr
 

Detailed Description

Definition at line 146 of file slink_nc.H.

Constructor & Destructor Documentation

◆ Iterator() [1/4]

Aleph::Slink_Nc::Iterator::Iterator ( )
inline

Definition at line 153 of file slink_nc.H.

◆ Iterator() [2/4]

Aleph::Slink_Nc::Iterator::Iterator ( Slink_Nc head_ptr)
inline

Definition at line 155 of file slink_nc.H.

◆ Iterator() [3/4]

Aleph::Slink_Nc::Iterator::Iterator ( Slink_Nc _head)
inline

Definition at line 160 of file slink_nc.H.

◆ Iterator() [4/4]

Aleph::Slink_Nc::Iterator::Iterator ( Slink_Nc head_ptr,
Slink_Nc curr_ptr 
)
inline

Definition at line 165 of file slink_nc.H.

Member Function Documentation

◆ get_curr()

Slink_Nc * Aleph::Slink_Nc::Iterator::get_curr ( ) const
inline

◆ get_curr_ne()

Slink_Nc * Aleph::Slink_Nc::Iterator::get_curr_ne ( ) const
inlinenoexcept

Returns current node address.

Definition at line 196 of file slink_nc.H.

References Aleph::and, curr, Aleph::divide_and_conquer_partition_dp(), and head.

Referenced by get_curr().

◆ has_curr()

bool Aleph::Slink_Nc::Iterator::has_curr ( ) const
inline

◆ is_in_first()

bool Aleph::Slink_Nc::Iterator::is_in_first ( ) const
inline

Returns true if iterator is on the first element.

Definition at line 209 of file slink_nc.H.

References curr, head, and Aleph::Slink_Nc::next.

◆ next()

void Aleph::Slink_Nc::Iterator::next ( )
inline

◆ next_ne()

void Aleph::Slink_Nc::Iterator::next_ne ( )
inlinenoexcept

Advances iterator by one position.

Definition at line 212 of file slink_nc.H.

References curr, and Aleph::Slink_Nc::get_next().

Referenced by next(), Aleph::Dyn_Slist_Nc< T >::operator[](), and Aleph::Dyn_Slist_Nc< T >::operator[]().

◆ operator!=()

bool Aleph::Slink_Nc::Iterator::operator!= ( const Iterator it) const
inline

Returns true if iterators have different states.

Definition at line 227 of file slink_nc.H.

References curr.

◆ operator==()

bool Aleph::Slink_Nc::Iterator::operator== ( const Iterator it) const
inline

Returns true if iterators are on the same element.

Definition at line 224 of file slink_nc.H.

References curr.

◆ reset()

void Aleph::Slink_Nc::Iterator::reset ( Slink_Nc new_head)
inline

◆ reset_first()

void Aleph::Slink_Nc::Iterator::reset_first ( )
inline

Resets iterator to the first node of the list.

Definition at line 171 of file slink_nc.H.

References Aleph::and, curr, Aleph::divide_and_conquer_partition_dp(), Aleph::Slink_Nc::get_next(), and head.

◆ set()

void Aleph::Slink_Nc::Iterator::set ( Slink_Nc new_curr)
inline

Definition at line 177 of file slink_nc.H.

References Aleph::and, curr, Aleph::divide_and_conquer_partition_dp(), and head.

◆ verify() [1/2]

bool Aleph::Slink_Nc::Iterator::verify ( const Iterator it) const
inline

Definition at line 231 of file slink_nc.H.

References head.

◆ verify() [2/2]

bool Aleph::Slink_Nc::Iterator::verify ( Slink_Nc l) const
inline

Definition at line 229 of file slink_nc.H.

References head, and l.

Member Data Documentation

◆ curr

Slink_Nc* Aleph::Slink_Nc::Iterator::curr
private

◆ head

Slink_Nc* Aleph::Slink_Nc::Iterator::head
private

Definition at line 148 of file slink_nc.H.

Referenced by get_curr_ne(), has_curr(), is_in_first(), reset(), reset_first(), set(), verify(), and verify().


The documentation for this class was generated from the following file: