Aleph-w  1.9
General library for algorithms and data structures
Aleph::Slinknc::Iterator Class Reference

#include <htlist.H>

Public Member Functions

 Iterator (Slinknc &list) noexcept
 
 Iterator (Slinknc *_head, Slinknc *_curr) noexcept
 
bool has_curr () const noexcept
 
Slinkncget_curr () const
 
Slinkncget_curr_ne () const noexcept
 Return the current link guaranteeing no exception. Be careful.
 
void next_ne () noexcept
 
void next ()
 
void reset_first () noexcept
 

Detailed Description

Iterator on single links

Constructor & Destructor Documentation

◆ Iterator() [1/2]

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

Initialize an iterator on the first node of list

◆ Iterator() [2/2]

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

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.

◆ has_curr()

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

Return true if the iterator is positioned on a valid link

◆ next()

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

Move the iterator one position forward. Throw overflow_error if there is no current link.

◆ next_ne()

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

Move the iterator one position forward guaranteeing no exception. Be careful.

◆ reset_first()

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

Reset the iterator to the first link on the list


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

Leandro Rabindranath León