PageIterator Class Reference

#include <PageIterator.h>

List of all members.


Detailed Description

HFPage 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

 PageIterator (BufferManager *buf, int firstId, string file)
 Constructs a page iterator.
bool hasNext ()
 Returns true if the iterator has more pages.
int next ()
 Returns the next page id in the iteration.


Constructor & Destructor Documentation

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

Constructs a page 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 PageIterator::hasNext (  ) 

Returns true if the iterator has more pages.

Returns:
true if the iterator has more pages.

int PageIterator::next (  ) 

Returns the next page id in the iteration.

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


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