os/persistentdata/persistentstorage/store/INC/U32STD.INL
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/store/INC/U32STD.INL	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,69 @@
     1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +// Template class TCapture
    1.20 +template <class T>
    1.21 +inline TCapture<T>::TCapture(T& aRef)
    1.22 +	: iPtr(&aRef)
    1.23 +	{}
    1.24 +template <class T>
    1.25 +inline T& TCapture<T>::Object() const
    1.26 +	{return *iPtr;}
    1.27 +
    1.28 +// Class TDesHeader
    1.29 +inline TDesHeader::TDesHeader(const TDesC8& aDes8)
    1.30 +	: iVal((aDes8.Length()<<1)+1)
    1.31 +	{}
    1.32 +inline TDesHeader::TDesHeader(const TDesC16& aDes16)
    1.33 +	: iVal((aDes16.Length()<<1))
    1.34 +	{}
    1.35 +inline TDesHeader& TDesHeader::operator=(const TDesC8& aDes8)
    1.36 +	{return *this=TDesHeader(aDes8);}
    1.37 +inline TDesHeader& TDesHeader::operator=(const TDesC16& aDes16)
    1.38 +	{return *this=TDesHeader(aDes16);}
    1.39 +inline TBool TDesHeader::IsWidth8() const
    1.40 +	{return TInt(iVal)&0x1;}
    1.41 +inline TBool TDesHeader::IsWidth16() const
    1.42 +	{return !IsWidth8();}
    1.43 +inline TInt TDesHeader::Length() const
    1.44 +	{return TInt(iVal)>>1;}
    1.45 +inline void TDesHeader::ExternalizeL(RWriteStream& aStream) const
    1.46 +	{aStream<<iVal;}
    1.47 +inline void TDesHeader::InternalizeL(RReadStream& aStream)
    1.48 +	{aStream>>iVal;}
    1.49 +
    1.50 +// Class TDesInternalizer
    1.51 +inline const TDesHeader& TDesInternalizer::Header() const
    1.52 +	{return iHeader;}
    1.53 +inline TDesHeader& TDesInternalizer::Header()
    1.54 +	{return iHeader;}
    1.55 +
    1.56 +// Class TPtrInput
    1.57 +inline TPtrInput::TPtrInput(TAny* aPtr)
    1.58 +	: iPtr((TUint8*)aPtr)
    1.59 +	{}
    1.60 +
    1.61 +// Class TPtrOutput
    1.62 +inline TPtrOutput::TPtrOutput(const TAny* aPtr)
    1.63 +	: iPtr((TUint8*)aPtr)
    1.64 +	{}
    1.65 +
    1.66 +// Class HDirectStoreBuf
    1.67 +inline HDirectStoreBuf::~HDirectStoreBuf()
    1.68 +	{RShareBuf::DoRelease();}
    1.69 +inline HDirectStoreBuf::HDirectStoreBuf(TInt anOffset)
    1.70 +	: iOff(anOffset)
    1.71 +	{}
    1.72 +