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

Iterator on the items of a stack. More...

#include <tpl_arrayStack.H>

Inheritance diagram for Aleph::ArrayStack< T >::Iterator:
[legend]
Collaboration diagram for Aleph::ArrayStack< T >::Iterator:
[legend]

Public Types

using Base = typename MemArray< T >::Iterator
 
using Set_Type = ArrayStack
 
- Public Types inherited from Aleph::MemArray< T >::Iterator
using Base = Array_Iterator< T >
 
- Public Types inherited from Aleph::Array_Iterator< T >
using Item_Type = T
 The type of elements being iterated.
 

Public Member Functions

 Iterator (const ArrayStack< T > &s)
 Initialize an iterator on stack s
 
- Public Member Functions inherited from Aleph::MemArray< T >::Iterator
 Iterator (const MemArray< T > &a) noexcept
 Construct an iterator on array a
 
- Public Member Functions inherited from Aleph::Array_Iterator< T >
Tget_base () noexcept
 Get the base pointer of the array.
 
constexpr const Tget_base () const noexcept
 Get the base pointer of the array (const version).
 
 Array_Iterator ()=default
 Default constructor - creates an invalid iterator.
 
 Array_Iterator (T *p, const size_t sz, const size_t n)
 Construct an iterator over an array.
 
 Array_Iterator (NoExceptionCtor, T *p, const size_t sz, const size_t n)
 Construct an iterator without exception checking.
 
 Array_Iterator (T *p, const size_t sz, const size_t n, const long f, const long l)
 Construct an iterator over a circular array region.
 
 Array_Iterator (NoExceptionCtor, T *p, const size_t sz, const size_t n, const long f, const long l)
 Construct a circular iterator without exception checking.
 
 Array_Iterator (const Array_Container< T > &c)
 Construct an iterator from an Array_Container.
 
bool has_curr () const noexcept
 Check if there is a current valid item.
 
bool is_last () const noexcept
 Check if positioned at the last item.
 
constexpr long get_pos () const noexcept
 Get the current position index.
 
Tget_curr_ne () const noexcept
 Get the current item without bounds checking.
 
Tget_curr () const
 Get the current item with bounds checking.
 
void next_ne () noexcept
 Advance to the next item without bounds checking.
 
void next ()
 Advance to the next item with bounds checking.
 
void prev_ne () noexcept
 Move to the previous item without bounds checking.
 
void prev ()
 Move to the previous item with bounds checking.
 
void reset () noexcept
 Reset the iterator to the first item.
 
void reset_first () noexcept
 Reset the iterator to the first item (alias for reset()).
 
void reset_last () noexcept
 Reset the iterator to the last item.
 
void end () noexcept
 Put the iterator at the end (past the last item).
 

Detailed Description

template<typename T>
class Aleph::ArrayStack< T >::Iterator

Iterator on the items of a stack.

The visit order goes from the oldest to the youngest item

Definition at line 287 of file tpl_arrayStack.H.

Member Typedef Documentation

◆ Base

template<typename T >
using Aleph::ArrayStack< T >::Iterator::Base = typename MemArray<T>::Iterator

Definition at line 291 of file tpl_arrayStack.H.

◆ Set_Type

template<typename T >
using Aleph::ArrayStack< T >::Iterator::Set_Type = ArrayStack

Definition at line 292 of file tpl_arrayStack.H.

Constructor & Destructor Documentation

◆ Iterator()

template<typename T >
Aleph::ArrayStack< T >::Iterator::Iterator ( const ArrayStack< T > &  s)
inline

Initialize an iterator on stack s

Definition at line 297 of file tpl_arrayStack.H.


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