WiscDB
 All Classes Functions Variables Friends
Public Member Functions
wiscdb::FileIterator Class Reference

Iterator for iterating over the pages in a file. More...

#include <file_iterator.h>

List of all members.

Public Member Functions

 FileIterator ()
 FileIterator (File *file)
 FileIterator (File *file, PageId page_number)
FileIteratoroperator++ ()
FileIterator operator++ (int)
bool operator== (const FileIterator &rhs) const
bool operator!= (const FileIterator &rhs) const
Page operator* () const

Detailed Description

Iterator for iterating over the pages in a file.

This class provides a forward-only iterator for iterating over all of the pages in a file.

Definition at line 23 of file file_iterator.h.


Constructor & Destructor Documentation

Constructs an empty iterator.

Definition at line 28 of file file_iterator.h.

Constructors an iterator over the pages in a file, starting at the first page.

Parameters:
fileFile to iterate over.

Definition at line 39 of file file_iterator.h.

wiscdb::FileIterator::FileIterator ( File file,
PageId  page_number 
) [inline]

Constructs an iterator over the pages in a file, starting at the given page number.

Parameters:
fileFile to iterate over.
page_numberNumber of page to start iterator at.

Definition at line 53 of file file_iterator.h.


Member Function Documentation

Page wiscdb::FileIterator::operator* ( ) const [inline]

Dereferences the iterator, returning a copy of the current page in the file.

Returns:
Page in file.

Definition at line 103 of file file_iterator.h.

FileIterator& wiscdb::FileIterator::operator++ ( ) [inline]

Advances the iterator to the next page in the file.

Definition at line 61 of file file_iterator.h.

bool wiscdb::FileIterator::operator== ( const FileIterator rhs) const [inline]

Returns true if this iterator is equal to the given iterator.

Parameters:
rhsIterator to compare against.
Returns:
True if other iterator is equal to this one.

Definition at line 87 of file file_iterator.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Friends