TwoQDirtyPageListIter< PageT > Class Template Reference

TwoQDirtyPageListIter iterates over queues containing dirty nodes, returning the parent pages corresponding to the dirty nodes. More...

#include <TwoQVictimPolicy.h>

Inheritance diagram for TwoQDirtyPageListIter< PageT >:

IntrusiveTwoDListIter< TwoQDirtyPage, PageT > List of all members.

Public Member Functions

 TwoQDirtyPageListIter ()
 TwoQDirtyPageListIter (TwoQDirtyPage *list1, TwoQDirtyPage *list2)
 ~TwoQDirtyPageListIter ()
void operator++ ()
PageT * operator-> () const
 operator PageT * () const
PageT & operator * () const
bool operator== (IntrusiveTwoDListIter const &other) const

Private Member Functions

virtual PageT * getReturnElement (TwoQDirtyPage *dirtyPage) const
 Returns a pointer to the parent cache page corresponding to the dirty node that the iterator is currently positioned on.

Detailed Description

template<class PageT>
class TwoQDirtyPageListIter< PageT >

TwoQDirtyPageListIter iterates over queues containing dirty nodes, returning the parent pages corresponding to the dirty nodes.

Definition at line 395 of file TwoQVictimPolicy.h.


Constructor & Destructor Documentation

template<class PageT>
TwoQDirtyPageListIter< PageT >::TwoQDirtyPageListIter (  )  [inline]

Definition at line 416 of file TwoQVictimPolicy.h.

template<class PageT>
TwoQDirtyPageListIter< PageT >::TwoQDirtyPageListIter ( TwoQDirtyPage list1,
TwoQDirtyPage list2 
) [inline]

Definition at line 421 of file TwoQVictimPolicy.h.

00422         : IntrusiveTwoDListIter<TwoQDirtyPage, PageT>(list1, list2)
00423     {
00424     }

template<class PageT>
TwoQDirtyPageListIter< PageT >::~TwoQDirtyPageListIter (  )  [inline]

Definition at line 426 of file TwoQVictimPolicy.h.

00427     {
00428     }


Member Function Documentation

template<class PageT>
virtual PageT* TwoQDirtyPageListIter< PageT >::getReturnElement ( TwoQDirtyPage dirtyPage  )  const [inline, private, virtual]

Returns a pointer to the parent cache page corresponding to the dirty node that the iterator is currently positioned on.

Parameters:
dirtyPage the dirty page node
Returns:
pointer to the cache page corresponding to the current dirty page

Implements IntrusiveTwoDListIter< TwoQDirtyPage, PageT >.

Definition at line 406 of file TwoQVictimPolicy.h.

References TwoQDirtyPage::getParentPage().

00407     {
00408         if (dirtyPage == NULL) {
00409             return NULL;
00410         } else {
00411             return static_cast<PageT *>(&(dirtyPage->getParentPage()));
00412         }
00413     }

void IntrusiveTwoDListIter< TwoQDirtyPage , PageT >::operator++ (  )  [inline, inherited]

Definition at line 207 of file IntrusiveDList.h.

References IntrusiveTwoDListIter< ElementT, ReturnT >::curr, IntrusiveTwoDListIter< ElementT, ReturnT >::next, and IntrusiveTwoDListIter< ElementT, ReturnT >::processingNext.

00208     {
00209         curr = static_cast<ElementT *>(curr->getNext());
00210         if (curr == NULL && !processingNext) {
00211             curr = next;
00212             processingNext = true;
00213         }
00214     }

PageT * IntrusiveTwoDListIter< TwoQDirtyPage , PageT >::operator-> (  )  const [inline, inherited]

Definition at line 216 of file IntrusiveDList.h.

References IntrusiveTwoDListIter< ElementT, ReturnT >::curr, and IntrusiveTwoDListIter< ElementT, ReturnT >::getReturnElement().

00217     {
00218         return getReturnElement(curr);
00219     }

IntrusiveTwoDListIter< TwoQDirtyPage , PageT >::operator PageT * (  )  const [inline, inherited]

Definition at line 221 of file IntrusiveDList.h.

00222     {
00223         return getReturnElement(curr);
00224     }

PageT & IntrusiveTwoDListIter< TwoQDirtyPage , PageT >::operator * (  )  const [inline, inherited]

Definition at line 226 of file IntrusiveDList.h.

References IntrusiveTwoDListIter< ElementT, ReturnT >::curr, and IntrusiveTwoDListIter< ElementT, ReturnT >::getReturnElement().

00227     {
00228         return *(getReturnElement(curr));
00229     }

bool IntrusiveTwoDListIter< TwoQDirtyPage , PageT >::operator== ( IntrusiveTwoDListIter< TwoQDirtyPage, PageT > const &  other  )  const [inline, inherited]

Definition at line 231 of file IntrusiveDList.h.

References IntrusiveTwoDListIter< ElementT, ReturnT >::curr.

00232     {
00233         return curr == other.curr;
00234     }


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