sl@0: // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: inline TBtreeToken::TBtreeToken(TPageRef aFirst,TPageRef aRoot,TBtreeHeight aHeight) sl@0: : iFirst(aFirst),iRoot(aRoot),iHeight(aHeight) sl@0: { sl@0: __ASSERT_DEBUG(aHeight<=KMaxBtreeHeight,User::Invariant()); sl@0: } sl@0: sl@0: inline void TBtree::MarkIntact() sl@0: {iStatus&=~EBroken;} sl@0: inline TBool TBtree::IsRoot(const TBtreePath& aPath) const sl@0: {return aPath.End()+1==iHeight;} sl@0: inline const MBtreeNodeOrg* TBtree::NodeOrg(TBool aLeaf) const sl@0: {if (aLeaf) return iLeafOrg; else return iIndexOrg;} sl@0: sl@0: inline const TBtreeInlineLeafOrg::SNode* TBtreeInlineLeafOrg::Node(const TAny* aNode) sl@0: {return (const SNode*)aNode;} sl@0: inline TBtreeInlineLeafOrg::SNode* TBtreeInlineLeafOrg::Node(TAny* aNode) sl@0: {return (SNode*)aNode;} sl@0: inline const TUint8* TBtreeInlineLeafOrg::Entry(const SNode* aNode,TInt anEntry) const sl@0: {return &aNode->iEntries[anEntry*iEntrySize];} sl@0: inline TUint8* TBtreeInlineLeafOrg::Entry(SNode* aNode,TInt anEntry) const sl@0: {return &aNode->iEntries[anEntry*iEntrySize];} sl@0: sl@0: inline const TBtreeInlineIndexOrg::SNode* TBtreeInlineIndexOrg::Node(const TAny* aNode) sl@0: {return (const SNode*)aNode;} sl@0: inline TBtreeInlineIndexOrg::SNode* TBtreeInlineIndexOrg::Node(TAny* aNode) sl@0: {return (SNode*)aNode;} sl@0: inline const TBtreeInlineIndexOrg::SEntry* TBtreeInlineIndexOrg::Entry(const SNode* aNode,TInt anEntry) const sl@0: {return (const SEntry*)&aNode->iEntries[anEntry*iEntrySize];} sl@0: inline TBtreeInlineIndexOrg::SEntry* TBtreeInlineIndexOrg::Entry(SNode* aNode,TInt anEntry) const sl@0: {return (SEntry*)&aNode->iEntries[anEntry*iEntrySize];} sl@0: inline TInt TBtreeInlineIndexOrg::KeySize() const sl@0: {return iEntrySize-sizeof(TPageRef);} sl@0: