#include <PageIterator.h>
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.
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. | |
| PageIterator::PageIterator | ( | BufferManager * | buf, | |
| int | firstId, | |||
| string | file | |||
| ) |
Constructs a page iterator.
| 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. |
| bool PageIterator::hasNext | ( | ) |
Returns true if the iterator has more pages.
| int PageIterator::next | ( | ) |
Returns the next page id in the iteration.
| NoSuchElementException | iteration has no more pages. |
1.4.7