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