os/persistentdata/persistentstorage/store/UBTREE/UB_STD.INL
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/store/UBTREE/UB_STD.INL	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,48 @@
     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 +inline TBtreeToken::TBtreeToken(TPageRef aFirst,TPageRef aRoot,TBtreeHeight aHeight)
    1.20 +	: iFirst(aFirst),iRoot(aRoot),iHeight(aHeight)
    1.21 +	{
    1.22 +	__ASSERT_DEBUG(aHeight<=KMaxBtreeHeight,User::Invariant());
    1.23 +	}
    1.24 +
    1.25 +inline void TBtree::MarkIntact()
    1.26 +	{iStatus&=~EBroken;}
    1.27 +inline TBool TBtree::IsRoot(const TBtreePath& aPath) const
    1.28 +	{return aPath.End()+1==iHeight;}
    1.29 +inline const MBtreeNodeOrg* TBtree::NodeOrg(TBool aLeaf) const
    1.30 +	{if (aLeaf) return iLeafOrg; else return iIndexOrg;}
    1.31 +
    1.32 +inline const TBtreeInlineLeafOrg::SNode* TBtreeInlineLeafOrg::Node(const TAny* aNode)
    1.33 +	{return (const SNode*)aNode;}
    1.34 +inline TBtreeInlineLeafOrg::SNode* TBtreeInlineLeafOrg::Node(TAny* aNode)
    1.35 +	{return (SNode*)aNode;}
    1.36 +inline const TUint8* TBtreeInlineLeafOrg::Entry(const SNode* aNode,TInt anEntry) const
    1.37 +	{return &aNode->iEntries[anEntry*iEntrySize];}
    1.38 +inline TUint8* TBtreeInlineLeafOrg::Entry(SNode* aNode,TInt anEntry) const
    1.39 +	{return &aNode->iEntries[anEntry*iEntrySize];}
    1.40 +
    1.41 +inline const TBtreeInlineIndexOrg::SNode* TBtreeInlineIndexOrg::Node(const TAny* aNode)
    1.42 +	{return (const SNode*)aNode;}
    1.43 +inline TBtreeInlineIndexOrg::SNode* TBtreeInlineIndexOrg::Node(TAny* aNode)
    1.44 +	{return (SNode*)aNode;}
    1.45 +inline const TBtreeInlineIndexOrg::SEntry* TBtreeInlineIndexOrg::Entry(const SNode* aNode,TInt anEntry) const
    1.46 +	{return (const SEntry*)&aNode->iEntries[anEntry*iEntrySize];}
    1.47 +inline TBtreeInlineIndexOrg::SEntry* TBtreeInlineIndexOrg::Entry(SNode* aNode,TInt anEntry) const
    1.48 +	{return (SEntry*)&aNode->iEntries[anEntry*iEntrySize];}
    1.49 +inline TInt TBtreeInlineIndexOrg::KeySize() const
    1.50 +	{return iEntrySize-sizeof(TPageRef);}
    1.51 +