sábado, 25 de agosto de 2007

Iterador.cpp

#include "stdlib.h>"
#include "Iterador.hpp"
#include "Lista.hpp"
#include "Nodo.hpp"

Iterador::Iterador(Lista *s)
{
current = s->head;
head = s->head;
}

Iterador::Iterador(Nodo *nodo)
{
current = nodo;
head = nodo;
}

Iterador::~Iterador(){}

void Iterador:: Next()
{
current = current->next;
}

Nodo* Iterador::Current()
{
if ( !IsDone() )
return current;
else return NULL;
}

int Iterador::IsDone()
{
return current == FALSE;
}

No hay comentarios.: