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

#include <tpl_slist.H>

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

Classes

class  Iterator
 

Public Types

typedef Snode< T > Node
 

Public Member Functions

 Slist ()
 Constructor vacío.
 
void insert_first (Node *node)
 
Noderemove_first_ne () noexcept
 
Noderemove_first ()
 
Nodeget_first ()
 Retorna el primer nodo de la lista.
 
T & get_data ()
 Retorna una referencia al dato contenido en el nodo.
 
Snoderemove_next ()
 
Snode *& get_next ()
 Retorna el nodo siguiente a this.
 
Snode *& get_first () const
 Retorna el nodo siguiente a this.
 
void reset ()
 Reinicia enlace a que apunte a sí mismo.
 
bool is_empty () const
 Retorna true si this está vacío (apunta a sí mismo)
 
void insert_next (Slink *p)
 

Protected Attributes

Slinknext
 

Detailed Description

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

Lista simplemente enlazada de nodos conteniendo datos de tipo T.

Slist<T> es una lista cuyos elementos son nodos. Cada nodo contiene un dato de tipo genérico T.

Parameters
Tel tipo de dato que alberga cada nodo.

Member Function Documentation

◆ insert_first()

template<typename T>
void Aleph::Slist< T >::insert_first ( Node node)
inline

Inserta un nodo después de this.

insert_first(node) inserta el nodo justamente después del nodo this.

Parameters
[in]nodeel nodo a insertar.
+ Here is the call graph for this function:

◆ insert_next()

void Aleph::Slink::insert_next ( Slink p)
inlineinherited

Inserta en enlace p después de this.

insert_next(p) inserta un nodo simple cuyo enlace es p después del nodo cuyo enlace es this.

Parameters
[in]pel enlace simple a insertar.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove_first()

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

Elimina el primer nodo de la lista y retorna su dirección.

Elimina el primer nodo de la lista.

Exceptions
underflow_errorsi la lista está vacía.
Returns
un puntero al nodo eliminado.
+ Here is the call graph for this function:

◆ remove_next()

template<typename T>
Snode* Aleph::Snode< T >::remove_next ( )
inlineinherited

Elimina el nodo siguiente a this.

remove_next() elimina el nodo enlazado después de this y retorna su dirección de memoria.

Returns
el nodo eliminado.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

Leandro Rabindranath León