ode/src/iterator.cpp
author Simon Howkins <simonh@symbian.org>
Wed, 03 Nov 2010 14:43:42 +0000
branchRCL_3
changeset 74 6b4d16c5c577
parent 0 2f259fa3e83a
permissions -rw-r--r--
Removed '-' character which was interfering with the operation of the MIFGUARD.

#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;
}