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

Iterator for iterating over the records in a page. More...

#include <page_iterator.h>

List of all members.

Public Member Functions

 PageIterator ()
 PageIterator (Page *page)
 PageIterator (Page *page, const RecordId &record_id)
PageIteratoroperator++ ()
PageIterator operator++ (int)
bool operator== (const PageIterator &rhs) const
bool operator!= (const PageIterator &rhs) const
std::string operator* () const
SlotId getNextUsedSlot (const SlotId start) const

Detailed Description

Iterator for iterating over the records in a page.

This class provides a forward-only iterator that iterates over all the records stored in a Page.

Definition at line 23 of file page_iterator.h.


Constructor & Destructor Documentation

Constructs an empty iterator.

Definition at line 28 of file page_iterator.h.

Constructs an iterator over the records in the given page, starting at the first record. Page must not be null.

Parameters:
pagePage to iterate over.

Definition at line 39 of file page_iterator.h.

wiscdb::PageIterator::PageIterator ( Page page,
const RecordId record_id 
) [inline]

Constructs an iterator over the records in the given page, starting at the given record.

Parameters:
pagePage to iterate over.
record_idID of record to start iterator at.

Definition at line 53 of file page_iterator.h.


Member Function Documentation

SlotId wiscdb::PageIterator::getNextUsedSlot ( const SlotId  start) const [inline]

Returns the next used slot in the page after the given slot or Page::INVALID_SLOT if no slots are used after the given slot.

Parameters:
startSlot to start search at.
Returns:
Next used slot after given slot or Page::INVALID_SLOT.

Definition at line 111 of file page_iterator.h.

std::string wiscdb::PageIterator::operator* ( ) const [inline]

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

Returns:
Record in page.

Definition at line 100 of file page_iterator.h.

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

Advances the iterator to the next record in the page.

Definition at line 61 of file page_iterator.h.

bool wiscdb::PageIterator::operator== ( const PageIterator 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 84 of file page_iterator.h.


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