ode/src/iterator.cpp
author William Roberts <williamr@symbian.org>
Thu, 08 Apr 2010 21:17:06 +0100
branchCompilerCompatibility
changeset 12 63e62fffcf54
parent 0 2f259fa3e83a
permissions -rw-r--r--
Change EXPORT_C in header file into IMPORT_C, to fix Bug 2478

#include "set.h"

iterator::iterator(set* sc){
    current = 1;
    this->s = sc;
}

iterator::~iterator(){
     delete s;
}

pair iterator::getElem(){
	return s->getElem(this -> current);
}

int iterator::hasNext(){
	if (current == s->length()) return 0;
	else return 1;
}

void iterator::next(){
	if (this->hasNext()) current++;
}

void iterator::setToFirst(){
	current = 1;
}