os/persistentdata/persistentstorage/store/UMEM/UM_STD.INL
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     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 inline TUint8* TMemBuf::Base() const
    17 	{
    18 	__ASSERT_DEBUG(iBase!=NULL,User::Invariant());
    19 	return iBase;
    20 	}
    21 inline TUint8* TMemBuf::End() const
    22 	{
    23 	__ASSERT_DEBUG(TStreamBuf::End(ERead)==TStreamBuf::End(EWrite),User::Invariant());
    24 	return TStreamBuf::End(EWrite);
    25 	}
    26 
    27 inline TDes8& TDesBuf::Des() const
    28 	{
    29 	__ASSERT_DEBUG(iDes!=NULL,User::Invariant());
    30 	return *iDes;
    31 	}
    32 inline TUint8* TDesBuf::Base() const
    33 	{
    34 	__ASSERT_DEBUG(Des().Ptr()!=NULL,User::Invariant());
    35 	return (TUint8*)Des().Ptr();
    36 	}
    37 
    38 inline CBufBase& TBufBuf::Buf() const
    39 	{
    40 	__ASSERT_DEBUG(iBuf!=NULL,User::Invariant());
    41 	return *iBuf;
    42 	}
    43 inline void TBufBuf::SetPos(TRead,TInt aPos)
    44 	{iRPos=aPos;}
    45 inline void TBufBuf::SetPos(TWrite,TInt aPos)
    46 	{iWPos=aPos;}
    47 inline TInt TBufBuf::Pos(TRead) const
    48 	{return iRPos;}
    49 inline TInt TBufBuf::Pos(TWrite) const
    50 	{return iWPos;}
    51 inline TInt TBufBuf::MovePos(TRead,TInt anOffset)
    52 	{return iRPos+=anOffset;}
    53 inline TInt TBufBuf::MovePos(TWrite,TInt anOffset)
    54 	{return iWPos+=anOffset;}
    55 inline TInt TBufBuf::Mark(TRead) const
    56 	{return Pos(ERead)-Avail(ERead);}
    57 inline TInt TBufBuf::Mark(TWrite) const
    58 	{return Pos(EWrite)-Avail(EWrite);}
    59