sl@0: // Copyright (c) 2008-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 the License "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: // f32\sfat32\inc\sl_leafdir_cache.inl sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: sl@0: Overloaded == operator sl@0: sl@0: @param aDirPos the position to compare sl@0: @return EFalse if aDirPos matches self, else sl@0: ETrue sl@0: */ sl@0: TBool TLeafDirData::operator==(const TLeafDirData &aDirPos) const sl@0: { sl@0: return (aDirPos.iClusterNum == iClusterNum); sl@0: } sl@0: sl@0: /** sl@0: Overloaded != operator sl@0: sl@0: @param aDirPos the position to compare sl@0: @return EFlase if aDirPos matches self, else sl@0: ETrue sl@0: */ sl@0: TBool TLeafDirData::operator!=(const TLeafDirData &aDirPos) const sl@0: { sl@0: return (aDirPos.iClusterNum != iClusterNum); sl@0: } sl@0: sl@0: /** sl@0: 'Get' function to retrieve the 'parent' node sl@0: sl@0: @return the parent node sl@0: */ sl@0: CLeafDirTreeNode* CLeafDirTreeNode::Parent() sl@0: { sl@0: return iParent; sl@0: } sl@0: sl@0: /** sl@0: Set Parent node sl@0: sl@0: @param the parent node to be set sl@0: */ sl@0: void CLeafDirTreeNode::SetParent(CLeafDirTreeNode* aNode) sl@0: { sl@0: iParent = aNode; sl@0: } sl@0: sl@0: /** sl@0: 'Get' function to retrieve children nodes sl@0: sl@0: @return the children nodes sl@0: */ sl@0: RPointerArray& CLeafDirTreeNode::Children() sl@0: { sl@0: return iChildren; sl@0: } sl@0: sl@0: /** sl@0: 'Get' function to retrieve dir location store by this node sl@0: sl@0: @return the location of the directory sl@0: */ sl@0: TUint32 CLeafDirTreeNode::StartClusterNum() const sl@0: { sl@0: return iLeafDirData.iClusterNum; sl@0: } sl@0: sl@0: const TLeafDirData& CLeafDirTreeNode::LeafDirData() const sl@0: { sl@0: return iLeafDirData; sl@0: } sl@0: sl@0: /** sl@0: Set position of the direcotry this node represents. sl@0: sl@0: @param aDirPos the position to be set sl@0: */ sl@0: void CLeafDirTreeNode::SetLeafDirData(const TLeafDirData& aLeafDirData) sl@0: { sl@0: iLeafDirData = aLeafDirData; sl@0: } sl@0: sl@0: /** sl@0: 'Get' function to retrieve dir path store by this node sl@0: sl@0: @return the path of the directory sl@0: */ sl@0: const TDesC& CLeafDirTreeNode::Path() const sl@0: { sl@0: return iPath; sl@0: } sl@0: sl@0: /** sl@0: Test if self is ERoot type sl@0: sl@0: @return ETrue if self is ERoot sl@0: EFalse if self is of other types sl@0: */ sl@0: TBool CLeafDirTreeNode::IsRoot() const sl@0: { sl@0: return (iNodeType == ERoot); sl@0: } sl@0: sl@0: /** sl@0: Test if self is ELeaf type sl@0: sl@0: @return ETrue if self is ELeaf sl@0: EFalse if self is of other types sl@0: */ sl@0: TBool CLeafDirTreeNode::IsLeaf() sl@0: { sl@0: return (iNodeType == ELeaf); sl@0: } sl@0: sl@0: /** sl@0: Test if self is ELeafIntermediary type sl@0: sl@0: @return ETrue if self is ELeafIntermediary sl@0: EFalse if self is of other types sl@0: */ sl@0: TBool CLeafDirTreeNode::IsLeafIntermediary() sl@0: { sl@0: return (iNodeType == ELeafIntermediary); sl@0: } sl@0: sl@0: /** sl@0: Test if self is EPureIntermediary type sl@0: sl@0: @return ETrue if self is EPureIntermediary sl@0: EFalse if self is of other types sl@0: */ sl@0: TBool CLeafDirTreeNode::IsPureIntermediary() sl@0: { sl@0: return (iNodeType == EPureIntermediary); sl@0: } sl@0: