RecordIterator Class Reference

#include <RecordIterator.h>

List of all members.


Detailed Description

Record iterator.

This class does not implement the Iterator interface because of the potential I/O exceptions. While they could be appropriately handled, it seemed more straightforward just to pass them on through.

Author:
Dave Musicant, with considerable material reused from the UW-Madison Minibase project


Public Member Functions

 RecordIterator (BufferManager *buf, int firstId, string file)
 Constructs a record iterator.
 ~RecordIterator ()
 Destructor.
bool hasNext ()
 Returns true if the iterator has more records.
RID next ()
 Returns the next RID in the iteration.


Constructor & Destructor Documentation

RecordIterator::RecordIterator ( BufferManager buf,
int  firstId,
string  file 
)

Constructs a record iterator.

Parameters:
buf pointer to a buffer manager to use for managing pages in memory.
firstId the page id of the starting page.
file the name of the file that the page are drawn from.


Member Function Documentation

bool RecordIterator::hasNext (  ) 

Returns true if the iterator has more records.

Returns:
true if the iterator has more records.

RID RecordIterator::next (  ) 

Returns the next RID in the iteration.

Returns:
the next RID.
Exceptions:
NoSuchElementException iteration has no more pages.


Generated on Thu Aug 30 08:39:23 2007 for Minibase by  doxygen 1.4.7