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

#include <htlist.H>

Collaboration diagram for Aleph::Slinknc::Iterator:
[legend]

Public Member Functions

 Iterator () noexcept
 
 Iterator (Slinknc &list) noexcept
 Initialize an iterator on the first node of list
 
 Iterator (Slinknc *_head, Slinknc *_curr) noexcept
 Initialize an iterator on the list pointed by _head, but on a node pointed by curr
 
bool has_curr () const noexcept
 Return true if the iterator is positioned on a valid link.
 
Slinkncget_curr () const
 
Slinkncget_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 ()
 
void reset_first () noexcept
 Reset the iterator to the first link on the list.
 

Private Member Functions

void init () noexcept
 

Private Attributes

Slinknchead
 
Slinknccurr
 

Detailed Description

 Iterator on single links

Definition at line 185 of file htlist.H.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

Aleph::Slinknc::Iterator::Iterator ( )
inlinenoexcept

Definition at line 197 of file htlist.H.

◆ Iterator() [2/3]

Aleph::Slinknc::Iterator::Iterator ( Slinknc list)
inlinenoexcept

Initialize an iterator on the first node of list

Definition at line 204 of file htlist.H.

References Aleph::init.

◆ Iterator() [3/3]

Aleph::Slinknc::Iterator::Iterator ( Slinknc _head,
Slinknc _curr 
)
inlinenoexcept

Initialize an iterator on the list pointed by _head, but on a node pointed by curr

Definition at line 215 of file htlist.H.

Member Function Documentation

◆ get_curr()

Slinknc * Aleph::Slinknc::Iterator::get_curr ( ) const
inline
   Return the current link on which the iterator is positioned.

Throw overflow_error if there is no current link.

Definition at line 235 of file htlist.H.

References ah_overflow_error_if, Aleph::divide_and_conquer_partition_dp(), and Aleph::has_curr().

Referenced by TEST(), TEST(), and TEST_F().

◆ get_curr_ne()

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

Return the current link guaranteeing no exception. Be careful.

Definition at line 243 of file htlist.H.

◆ has_curr()

bool Aleph::Slinknc::Iterator::has_curr ( ) const
inlinenoexcept

Return true if the iterator is positioned on a valid link.

Definition at line 225 of file htlist.H.

Referenced by TEST(), TEST(), and TEST_F().

◆ init()

void Aleph::Slinknc::Iterator::init ( )
inlineprivatenoexcept

◆ next()

void Aleph::Slinknc::Iterator::next ( )
inline
   Move the iterator one position forward. Throw `overflow_error`

if there is no current link.

Definition at line 254 of file htlist.H.

References ah_overflow_error_if, Aleph::divide_and_conquer_partition_dp(), Aleph::has_curr(), and Aleph::Slinknc::next.

Referenced by TEST(), and TEST_F().

◆ next_ne()

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

Move the iterator one position forward guaranteeing no exception.

Be careful.

Definition at line 247 of file htlist.H.

References Aleph::Slinknc::next.

◆ reset_first()

void Aleph::Slinknc::Iterator::reset_first ( )
inlinenoexcept

Reset the iterator to the first link on the list.

Definition at line 263 of file htlist.H.

References Aleph::init.

Referenced by TEST_F().

Member Data Documentation

◆ curr

Slinknc* Aleph::Slinknc::Iterator::curr
private

Definition at line 188 of file htlist.H.

◆ head

Slinknc* Aleph::Slinknc::Iterator::head
private

Definition at line 187 of file htlist.H.


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