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

#include <tpl_slist.H>

+ Inheritance diagram for Aleph::Slist< T >::Iterator:

Public Types

typedef Snode< T > Set_Type
 El tipo de conjunto sobre el cual se itera.
 
typedef Snode< T > * Item_Type
 El tipo de elemento que retorna get_curr().
 

Public Member Functions

 Iterator (Slist &_list)
 
bool has_curr () const
 Retorna true si el iterador tiene nodo actual.
 
Nodeget_curr ()
 
void next ()
 
void reset_first ()
 Coloca el iterador en el primer elemento de la lista.
 
Iteratoroperator= (Node *node)
 

Detailed Description

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

Iterador sobre lista de nodos simples.

Esta clase define un iterador sobre una lista simplemente enlazada de nodos.

See also
Slist

Constructor & Destructor Documentation

◆ Iterator()

template<typename T>
Aleph::Slist< T >::Iterator::Iterator ( Slist _list)
inline

Constructor.

Construye un iterador sobre la lista de nodos list.

Parameters
[in]_listla lista sobre la cual se desea iterar.

Member Function Documentation

◆ get_curr()

template<typename T>
Node* Aleph::Slist< T >::Iterator::get_curr ( )
inline

Retorna el nodo actual sobre el cual está posicionado el iterador.

Returns
un apuntador al elemento actual.
Exceptions
overflow_errorsi el iterador no está posicionado sobre un elemento.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ next()

template<typename T>
void Aleph::Slist< T >::Iterator::next ( )
inline

Avanza el iterador hacia adelante.

Avanza el iterador hacia el elemento siguiente del actual.

Si el iterador se encuentra en el último elemento de la secuencia, entonces éste queda en un estado en que no hay elemento actual.

Exceptions
overflow_errorsi el iterador no se encuentra sobre un elemento actual.
+ Here is the call graph for this function:

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

Leandro Rabindranath León