persistentstorage/store/INC/U32STD.INL
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 // Template class TCapture
       
    17 template <class T>
       
    18 inline TCapture<T>::TCapture(T& aRef)
       
    19 	: iPtr(&aRef)
       
    20 	{}
       
    21 template <class T>
       
    22 inline T& TCapture<T>::Object() const
       
    23 	{return *iPtr;}
       
    24 
       
    25 // Class TDesHeader
       
    26 inline TDesHeader::TDesHeader(const TDesC8& aDes8)
       
    27 	: iVal((aDes8.Length()<<1)+1)
       
    28 	{}
       
    29 inline TDesHeader::TDesHeader(const TDesC16& aDes16)
       
    30 	: iVal((aDes16.Length()<<1))
       
    31 	{}
       
    32 inline TDesHeader& TDesHeader::operator=(const TDesC8& aDes8)
       
    33 	{return *this=TDesHeader(aDes8);}
       
    34 inline TDesHeader& TDesHeader::operator=(const TDesC16& aDes16)
       
    35 	{return *this=TDesHeader(aDes16);}
       
    36 inline TBool TDesHeader::IsWidth8() const
       
    37 	{return TInt(iVal)&0x1;}
       
    38 inline TBool TDesHeader::IsWidth16() const
       
    39 	{return !IsWidth8();}
       
    40 inline TInt TDesHeader::Length() const
       
    41 	{return TInt(iVal)>>1;}
       
    42 inline void TDesHeader::ExternalizeL(RWriteStream& aStream) const
       
    43 	{aStream<<iVal;}
       
    44 inline void TDesHeader::InternalizeL(RReadStream& aStream)
       
    45 	{aStream>>iVal;}
       
    46 
       
    47 // Class TDesInternalizer
       
    48 inline const TDesHeader& TDesInternalizer::Header() const
       
    49 	{return iHeader;}
       
    50 inline TDesHeader& TDesInternalizer::Header()
       
    51 	{return iHeader;}
       
    52 
       
    53 // Class TPtrInput
       
    54 inline TPtrInput::TPtrInput(TAny* aPtr)
       
    55 	: iPtr((TUint8*)aPtr)
       
    56 	{}
       
    57 
       
    58 // Class TPtrOutput
       
    59 inline TPtrOutput::TPtrOutput(const TAny* aPtr)
       
    60 	: iPtr((TUint8*)aPtr)
       
    61 	{}
       
    62 
       
    63 // Class HDirectStoreBuf
       
    64 inline HDirectStoreBuf::~HDirectStoreBuf()
       
    65 	{RShareBuf::DoRelease();}
       
    66 inline HDirectStoreBuf::HDirectStoreBuf(TInt anOffset)
       
    67 	: iOff(anOffset)
       
    68 	{}
       
    69