Aleph-w  1.9
General library for algorithms and data structures
Aleph::DynListQueue< T >::Iterator Struct Reference

#include <tpl_dynListQueue.H>

+ Inheritance diagram for Aleph::DynListQueue< T >::Iterator:
+ Collaboration diagram for Aleph::DynListQueue< T >::Iterator:

Public Types

using Base = typename DynList< T >::Iterator
 
using Item_Type = T
 
using Iterator_Type = Iterator
 The type of elements of list.
 
using Set_Type = DynList
 

Public Member Functions

 Iterator (const DynListQueue< T > &q) noexcept
 
T & get_curr_ne () const noexcept
 Return the current link guaranteeing no exception. Be careful.
 
T & get_curr () const
 
del ()
 
void reset () noexcept
 
long get_pos () const noexcept
 
void reset_first () noexcept
 
void reset_last ()
 It has O(n) of performance.
 
void end () noexcept
 
bool has_curr () const noexcept
 
bool is_last () const noexcept
 
bool is_in_first () const noexcept
 Return true if the iterator is positioned on the first item.
 
bool is_in_last () const noexcept
 Return true if the iterator is positioned on the last item.
 
void next_ne () noexcept
 
void next ()
 
Slinkncdel_ne () noexcept
 

Detailed Description

template<typename T>
struct Aleph::DynListQueue< T >::Iterator

Iterator on elements of a queue.

The visit order is from the youngest to the oldest item

Member Function Documentation

◆ del()

template<typename T = int>
T Aleph::DynList< T >::Iterator::del ( )
inlineinherited

Remove the current item of the iterator.

del() removes the current item and advance forward the iterator to the next item.

Returns
a moved copy of removed item (moved because the original will be destroyed)
Exceptions
overflow_errorif the iterator has not current item
+ Here is the call graph for this function:

◆ end()

void Aleph::HTList::Iterator::end ( )
inlinenoexceptinherited

Set the iterator to its end position, which has not current item.

◆ get_curr()

template<typename T = int>
T& Aleph::DynList< T >::Iterator::get_curr ( ) const
inlineinherited

Return the current item

Returns
a modifiable reference to the current item
Exceptions
overflow_errorif the iterator has not current item
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_pos()

long Aleph::HTList::Iterator::get_pos ( ) const
inlinenoexceptinherited

Return the current position

◆ has_curr()

bool Aleph::HTList::Iterator::has_curr ( ) const
inlinenoexceptinherited

Return true if iterator has current item

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ next()

void Aleph::HTList::Iterator::next ( )
inlineinherited

Move the iterator one item forward. Throw overflow_error if iterator has not current item

◆ next_ne()

void Aleph::HTList::Iterator::next_ne ( )
inlinenoexceptinherited

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

+ Here is the caller graph for this function:

◆ reset()

void Aleph::HTList::Iterator::reset ( )
inlinenoexceptinherited

Reset the iterator at the first item

◆ reset_first()

void Aleph::HTList::Iterator::reset_first ( )
inlinenoexceptinherited

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

+ Here is the call graph for this function:

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

Leandro Rabindranath León