RandomVictimPolicy< PageT >::PageIterator Class Reference

#include <RandomVictimPolicy.h>

List of all members.

Public Member Functions

 PageIterator (RandomVictimPolicy &policyInit, uint iPageInit)
void operator++ ()
PageT * operator-> () const
 operator PageT * () const
PageT & operator * () const
bool operator== (PageIterator const &other) const

Private Member Functions

PageT * getCurrent () const

Private Attributes

RandomVictimPolicy policy
uint iPage


Detailed Description

template<class PageT>
class RandomVictimPolicy< PageT >::PageIterator

Definition at line 68 of file RandomVictimPolicy.h.


Constructor & Destructor Documentation

template<class PageT>
RandomVictimPolicy< PageT >::PageIterator::PageIterator ( RandomVictimPolicy policyInit,
uint  iPageInit 
) [inline]

Definition at line 79 of file RandomVictimPolicy.h.

References RandomVictimPolicy< PageT >::PageIterator::iPage.

00080             : policy(policyInit)
00081         {
00082             iPage = iPageInit;
00083         }


Member Function Documentation

template<class PageT>
PageT* RandomVictimPolicy< PageT >::PageIterator::getCurrent (  )  const [inline, private]

Definition at line 73 of file RandomVictimPolicy.h.

References RandomVictimPolicy< PageT >::PageIterator::iPage, RandomVictimPolicy< PageT >::pages, and RandomVictimPolicy< PageT >::PageIterator::policy.

Referenced by RandomVictimPolicy< PageT >::PageIterator::operator *(), RandomVictimPolicy< PageT >::PageIterator::operator PageT *(), and RandomVictimPolicy< PageT >::PageIterator::operator->().

00074         {
00075             return policy.pages[iPage];
00076         }

template<class PageT>
void RandomVictimPolicy< PageT >::PageIterator::operator++ (  )  [inline]

Definition at line 85 of file RandomVictimPolicy.h.

References RandomVictimPolicy< PageT >::PageIterator::iPage, RandomVictimPolicy< PageT >::pages, and RandomVictimPolicy< PageT >::PageIterator::policy.

00086         {
00087             iPage++;
00088             if (iPage >= policy.pages.size()) {
00089                 iPage = 0;
00090             }
00091         }

template<class PageT>
PageT* RandomVictimPolicy< PageT >::PageIterator::operator-> (  )  const [inline]

Definition at line 93 of file RandomVictimPolicy.h.

References RandomVictimPolicy< PageT >::PageIterator::getCurrent().

00094         {
00095             return getCurrent();
00096         }

template<class PageT>
RandomVictimPolicy< PageT >::PageIterator::operator PageT * (  )  const [inline]

Definition at line 98 of file RandomVictimPolicy.h.

References RandomVictimPolicy< PageT >::PageIterator::getCurrent().

00099         {
00100             return getCurrent();
00101         }

template<class PageT>
PageT& RandomVictimPolicy< PageT >::PageIterator::operator * (  )  const [inline]

Definition at line 103 of file RandomVictimPolicy.h.

References RandomVictimPolicy< PageT >::PageIterator::getCurrent().

00104         {
00105             return *getCurrent();
00106         }

template<class PageT>
bool RandomVictimPolicy< PageT >::PageIterator::operator== ( PageIterator const &  other  )  const [inline]

Definition at line 108 of file RandomVictimPolicy.h.

References RandomVictimPolicy< PageT >::PageIterator::iPage.

00109         {
00110             // NOTE:  assume policy object is same
00111             return iPage == other.iPage;
00112         }


Member Data Documentation

template<class PageT>
RandomVictimPolicy RandomVictimPolicy< PageT >::PageIterator::policy [private]

Definition at line 70 of file RandomVictimPolicy.h.

Referenced by RandomVictimPolicy< PageT >::PageIterator::getCurrent(), and RandomVictimPolicy< PageT >::PageIterator::operator++().

template<class PageT>
uint RandomVictimPolicy< PageT >::PageIterator::iPage [private]

Definition at line 71 of file RandomVictimPolicy.h.

Referenced by RandomVictimPolicy< PageT >::PageIterator::getCurrent(), RandomVictimPolicy< PageT >::PageIterator::operator++(), RandomVictimPolicy< PageT >::PageIterator::operator==(), and RandomVictimPolicy< PageT >::PageIterator::PageIterator().


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:44 2009 for Fennel by  doxygen 1.5.1