epoc32/include/s32page.inl
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
// Class TPageRef
williamr@2
    17
inline TPageRef::TPageRef(TUint32 aValue)
williamr@2
    18
	: iVal(aValue)
williamr@2
    19
/** Constructor that initialises the object to a page reference value.
williamr@2
    20
williamr@2
    21
@param aValue Page reference value */
williamr@2
    22
	{}
williamr@2
    23
inline TBool TPageRef::operator==(TPageRef aRef) const
williamr@2
    24
/** Equality operator.
williamr@2
    25
williamr@2
    26
@param aRef Page reference against which to compare
williamr@2
    27
@return True if aRef refers to the same page as the object, otherwise false. */
williamr@2
    28
	{return iVal==aRef.iVal;}
williamr@2
    29
inline TBool TPageRef::operator!=(TPageRef aRef) const
williamr@2
    30
/** Inequality operator.
williamr@2
    31
williamr@2
    32
@param aRef Page reference against which to compare
williamr@2
    33
@return True if aRef does not refer to the same page as the object, otherwise 
williamr@2
    34
false. */
williamr@2
    35
	{return iVal!=aRef.iVal;}
williamr@2
    36
inline void TPageRef::ExternalizeL(RWriteStream& aStream) const
williamr@2
    37
/** Externalises a TPageRef object to a write stream.
williamr@2
    38
williamr@2
    39
@param aStream Stream to which the object should be externalised. */
williamr@2
    40
	{aStream<<iVal;}
williamr@2
    41
inline void TPageRef::InternalizeL(RReadStream& aStream)
williamr@2
    42
/** Internalises a TPageRef object from a read stream.
williamr@2
    43
williamr@2
    44
@param aStream Stream from which the object should be internalised. */
williamr@2
    45
	{aStream>>iVal;}
williamr@2
    46
inline TUint32 TPageRef::Value() const
williamr@2
    47
/** Gets the page reference value.
williamr@2
    48
williamr@2
    49
@return Page reference value */
williamr@2
    50
	{return iVal;}
williamr@2
    51
williamr@2
    52
// Class MPagePool
williamr@2
    53
inline void MPagePool::Pop()
williamr@2
    54
/** Do a pop from the cleanup stack. */
williamr@2
    55
	{CleanupStack::Pop();}
williamr@2
    56
williamr@2
    57
// Class CPageCache::TStats
williamr@2
    58
#if defined(__PAGE_CACHE_STATS)
williamr@2
    59
inline TInt CPageCache::TStats::Requests() const
williamr@2
    60
	{return iRequests;}
williamr@2
    61
inline TInt CPageCache::TStats::Hits() const
williamr@2
    62
	{return iRequests-iMisses;}
williamr@2
    63
inline TInt CPageCache::TStats::Misses() const
williamr@2
    64
	{return iMisses;}
williamr@2
    65
inline void CPageCache::TStats::Reset()
williamr@2
    66
	{iRequests=0;iMisses=0;}
williamr@2
    67
#endif
williamr@2
    68
williamr@2
    69
// Class CPageCache
williamr@2
    70
#if defined(__PAGE_CACHE_STATS)
williamr@2
    71
inline CPageCache::TStats& CPageCache::Stats()
williamr@2
    72
	{return iStats;}
williamr@2
    73
inline const CPageCache::TStats& CPageCache::Stats() const
williamr@2
    74
	{return iStats;}
williamr@2
    75
#endif
williamr@2
    76
williamr@2
    77
// Class TCachePagePool
williamr@2
    78
inline void TCachePagePool::Set(CPageCache& aCache)
williamr@2
    79
/** Sets the page cache for the pool.
williamr@2
    80
williamr@2
    81
@param aCache The page cache for the pool. */
williamr@2
    82
	{iCache=&aCache;}
williamr@2
    83
inline TCachePagePool::TCachePagePool()
williamr@2
    84
	: iCache(NULL)
williamr@2
    85
	{}
williamr@2
    86
inline TCachePagePool::TCachePagePool(CPageCache& aCache)
williamr@2
    87
	: iCache(&aCache)
williamr@2
    88
	{}
williamr@4
    89