Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Zygoma::PageFrameTableIterator Class Reference
[Kernel Physical Memory Management]

#include <pageframetable.h>

Collaboration diagram for Zygoma::PageFrameTableIterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Iterators over the page frame table model STL-style random access iterators.

It would be possible to just use pointers to PageFrames as iterators over the table, except for 2 things. First, we need a UDT (user-defined type) to differentiate a page frame table iterator from a regular physical address in function overloads, and second, we need a conversion function that will deliver the page from physical base address given the page frame table iterator


Public Types

typedef std::random_access_iterator_tag iterator_category
typedef PageFrame value_type
typedef std::ptrdiff_t difference_type
typedef PageFramepointer
typedef PageFramereference

Public Member Functions

 PageFrameTableIterator (PageFrameTable &, difference_type offset=0)
 Constructs a page frame table iterator starting at offset page frames from the beginning of the table.
 PageFrameTableIterator (const PageFrameTableIterator &rhs)
 Copy constructs a page frame table iterator.
PageFrameTableIteratoroperator= (const PageFrameTableIterator &rhs)
 Copy assigns a page frame table iterator.
 ~PageFrameTableIterator ()
 Destructs a page frame table iterator.
reference operator * ()
 Dereference operator.
reference operator[] (difference_type)
 Indexing operator.
pointer operator-> ()
 Member access operator.
PhysicalAddress baseAddress () const
 Conversion to PhysicalAddress.
Iterator arithmentic operators.
PageFrameTableIteratoroperator++ ()
 Preincrement operator.
PageFrameTableIteratoroperator++ (int)
 Postincrement operator.
PageFrameTableIteratoroperator-- ()
 Predecrement operator.
PageFrameTableIteratoroperator-- (int)
 Postdecrement operator.
PageFrameTableIteratoroperator+= (difference_type)
 Increment operator.
PageFrameTableIteratoroperator- (difference_type)
 Decrement operator.
difference_type operator- (const PageFrameTableIterator &)
 Difference operator.
Comparison operations
bool equals (const PageFrameTableIterator &rhs) const
bool lessThan (const PageFrameTableIterator &rhs) const


Member Typedef Documentation

typedef std::ptrdiff_t Zygoma::PageFrameTableIterator::difference_type
 

typedef std::random_access_iterator_tag Zygoma::PageFrameTableIterator::iterator_category
 

typedef PageFrame* Zygoma::PageFrameTableIterator::pointer
 

typedef PageFrame& Zygoma::PageFrameTableIterator::reference
 

typedef PageFrame Zygoma::PageFrameTableIterator::value_type
 


Constructor & Destructor Documentation

PageFrameTableIterator::PageFrameTableIterator PageFrameTable pageFrameTable,
difference_type  offset = 0
 

Constructs a page frame table iterator starting at offset page frames from the beginning of the table.

Parameters:
pageFrameTable [IN] The page frame table.
offset [IN] The initial number of frames from the beginning.

PageFrameTableIterator::PageFrameTableIterator const PageFrameTableIterator rhs  ) 
 

Copy constructs a page frame table iterator.

PageFrameTableIterator::~PageFrameTableIterator  ) 
 

Destructs a page frame table iterator.


Member Function Documentation

PhysicalAddress PageFrameTableIterator::baseAddress  )  const
 

Conversion to PhysicalAddress.

bool Zygoma::PageFrameTableIterator::equals const PageFrameTableIterator rhs  )  const [inline]
 

bool Zygoma::PageFrameTableIterator::lessThan const PageFrameTableIterator rhs  )  const [inline]
 

PageFrameTableIterator::reference PageFrameTableIterator::operator *  ) 
 

Dereference operator.

Returns:
a reference to the page frame currently referenced by the page frame table iterator.

PageFrameTableIterator & PageFrameTableIterator::operator++ int   ) 
 

Postincrement operator.

PageFrameTableIterator & PageFrameTableIterator::operator++  ) 
 

Preincrement operator.

PageFrameTableIterator & PageFrameTableIterator::operator+= difference_type   ) 
 

Increment operator.

PageFrameTableIterator::difference_type PageFrameTableIterator::operator- const PageFrameTableIterator  ) 
 

Difference operator.

PageFrameTableIterator & PageFrameTableIterator::operator- difference_type   ) 
 

Decrement operator.

PageFrameTableIterator & PageFrameTableIterator::operator-- int   ) 
 

Postdecrement operator.

PageFrameTableIterator & PageFrameTableIterator::operator--  ) 
 

Predecrement operator.

PageFrameTableIterator::pointer PageFrameTableIterator::operator->  ) 
 

Member access operator.

Returns:
a pointer to the underlying page frame currently referenced by the page frame table iterator.

PageFrameTableIterator & PageFrameTableIterator::operator= const PageFrameTableIterator rhs  ) 
 

Copy assigns a page frame table iterator.

PageFrameTableIterator::reference PageFrameTableIterator::operator[] PageFrameTableIterator::difference_type  offset  ) 
 

Indexing operator.

I'm not sure if this should really be an iterator operation.

Parameters:
offset [IN] The index of a page frame.


The documentation for this class was generated from the following files:
Generated on Fri Sep 2 10:45:09 2005 for zygoma by doxygen 1.4.2