DeviceIdPagePredicate Class Reference

DeviceIdPagePredicate is an implementation of PagePredicate which returns true for pages mapped to a given DeviceId. More...

#include <PagePredicate.h>

Inheritance diagram for DeviceIdPagePredicate:

PagePredicate List of all members.

Public Member Functions

 DeviceIdPagePredicate (DeviceId)
virtual bool operator() (CachePage const &page)
 Tests the predicate.

Private Attributes

DeviceId deviceId

Detailed Description

DeviceIdPagePredicate is an implementation of PagePredicate which returns true for pages mapped to a given DeviceId.

Definition at line 56 of file PagePredicate.h.


Constructor & Destructor Documentation

DeviceIdPagePredicate::DeviceIdPagePredicate ( DeviceId   )  [explicit]

Definition at line 33 of file PagePredicate.cpp.

References deviceId.

00034 {
00035     deviceId = deviceIdinit;
00036 }


Member Function Documentation

bool DeviceIdPagePredicate::operator() ( CachePage const &  page  )  [virtual]

Tests the predicate.

Parameters:
page the page to be considered
Returns:
true iff the page satisfies the predicate

Implements PagePredicate.

Definition at line 38 of file PagePredicate.cpp.

References deviceId, CachePage::getBlockId(), and CompoundId::getDeviceId().

00039 {
00040     return CompoundId::getDeviceId(page.getBlockId()) == deviceId;
00041 }


Member Data Documentation

DeviceId DeviceIdPagePredicate::deviceId [private]

Definition at line 59 of file PagePredicate.h.

Referenced by DeviceIdPagePredicate(), and operator()().


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