williamr@2: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: // Class TPageRef williamr@2: inline TPageRef::TPageRef(TUint32 aValue) williamr@2: : iVal(aValue) williamr@2: /** Constructor that initialises the object to a page reference value. williamr@2: williamr@2: @param aValue Page reference value */ williamr@2: {} williamr@2: inline TBool TPageRef::operator==(TPageRef aRef) const williamr@2: /** Equality operator. williamr@2: williamr@2: @param aRef Page reference against which to compare williamr@2: @return True if aRef refers to the same page as the object, otherwise false. */ williamr@2: {return iVal==aRef.iVal;} williamr@2: inline TBool TPageRef::operator!=(TPageRef aRef) const williamr@2: /** Inequality operator. williamr@2: williamr@2: @param aRef Page reference against which to compare williamr@2: @return True if aRef does not refer to the same page as the object, otherwise williamr@2: false. */ williamr@2: {return iVal!=aRef.iVal;} williamr@2: inline void TPageRef::ExternalizeL(RWriteStream& aStream) const williamr@2: /** Externalises a TPageRef object to a write stream. williamr@2: williamr@2: @param aStream Stream to which the object should be externalised. */ williamr@2: {aStream<>iVal;} williamr@2: inline TUint32 TPageRef::Value() const williamr@2: /** Gets the page reference value. williamr@2: williamr@2: @return Page reference value */ williamr@2: {return iVal;} williamr@2: williamr@2: // Class MPagePool williamr@2: inline void MPagePool::Pop() williamr@2: /** Do a pop from the cleanup stack. */ williamr@2: {CleanupStack::Pop();} williamr@2: williamr@2: // Class CPageCache::TStats williamr@2: #if defined(__PAGE_CACHE_STATS) williamr@2: inline TInt CPageCache::TStats::Requests() const williamr@2: {return iRequests;} williamr@2: inline TInt CPageCache::TStats::Hits() const williamr@2: {return iRequests-iMisses;} williamr@2: inline TInt CPageCache::TStats::Misses() const williamr@2: {return iMisses;} williamr@2: inline void CPageCache::TStats::Reset() williamr@2: {iRequests=0;iMisses=0;} williamr@2: #endif williamr@2: williamr@2: // Class CPageCache williamr@2: #if defined(__PAGE_CACHE_STATS) williamr@2: inline CPageCache::TStats& CPageCache::Stats() williamr@2: {return iStats;} williamr@2: inline const CPageCache::TStats& CPageCache::Stats() const williamr@2: {return iStats;} williamr@2: #endif williamr@2: williamr@2: // Class TCachePagePool williamr@2: inline void TCachePagePool::Set(CPageCache& aCache) williamr@2: /** Sets the page cache for the pool. williamr@2: williamr@2: @param aCache The page cache for the pool. */ williamr@2: {iCache=&aCache;} williamr@2: inline TCachePagePool::TCachePagePool() williamr@2: : iCache(NULL) williamr@2: {} williamr@2: inline TCachePagePool::TCachePagePool(CPageCache& aCache) williamr@2: : iCache(&aCache) williamr@2: {} williamr@4: