os/kernelhwsrv/userlibandfileserver/fileserver/sfat/sl_leafdir_cache.inl
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// f32\sfat32\inc\sl_leafdir_cache.inl
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sl@0
    19
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sl@0
    20
//!!
sl@0
    21
//!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it
sl@0
    22
//!!
sl@0
    23
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sl@0
    24
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
sl@0
    25
sl@0
    26
sl@0
    27
/**
sl@0
    28
 @file
sl@0
    29
 @internalTechnology
sl@0
    30
 
sl@0
    31
 Overloaded == operator 
sl@0
    32
 
sl@0
    33
 @param aDirPos the position to compare
sl@0
    34
 @return    EFalse  if aDirPos matches self, else
sl@0
    35
 ETrue
sl@0
    36
*/
sl@0
    37
TBool TLeafDirData::operator==(const TLeafDirData &aDirPos) const
sl@0
    38
    {
sl@0
    39
    return (aDirPos.iClusterNum == iClusterNum);
sl@0
    40
    }
sl@0
    41
sl@0
    42
/**
sl@0
    43
Overloaded != operator 
sl@0
    44
sl@0
    45
@param  aDirPos the position to compare
sl@0
    46
@return EFlase  if aDirPos matches self, else
sl@0
    47
        ETrue
sl@0
    48
*/
sl@0
    49
TBool TLeafDirData::operator!=(const TLeafDirData &aDirPos) const 
sl@0
    50
    {
sl@0
    51
    return (aDirPos.iClusterNum != iClusterNum);
sl@0
    52
    }
sl@0
    53
sl@0
    54
/**
sl@0
    55
'Get' function to retrieve the 'parent' node
sl@0
    56
sl@0
    57
@return the parent node   
sl@0
    58
*/
sl@0
    59
CLeafDirTreeNode* CLeafDirTreeNode::Parent()
sl@0
    60
    {
sl@0
    61
    return iParent;
sl@0
    62
    }
sl@0
    63
sl@0
    64
/**
sl@0
    65
Set Parent node
sl@0
    66
sl@0
    67
@param  the parent node to be set   
sl@0
    68
*/
sl@0
    69
void CLeafDirTreeNode::SetParent(CLeafDirTreeNode* aNode)
sl@0
    70
    {
sl@0
    71
    iParent = aNode;
sl@0
    72
    }
sl@0
    73
sl@0
    74
/**
sl@0
    75
'Get' function to retrieve children nodes
sl@0
    76
sl@0
    77
@return the children nodes   
sl@0
    78
*/
sl@0
    79
RPointerArray<CLeafDirTreeNode>& CLeafDirTreeNode::Children()
sl@0
    80
    {
sl@0
    81
    return iChildren;
sl@0
    82
    }
sl@0
    83
sl@0
    84
/**
sl@0
    85
'Get' function to retrieve dir location store by this node 
sl@0
    86
sl@0
    87
@return the location of the directory
sl@0
    88
*/
sl@0
    89
TUint32 CLeafDirTreeNode::StartClusterNum() const
sl@0
    90
    {
sl@0
    91
    return iLeafDirData.iClusterNum;
sl@0
    92
    }
sl@0
    93
sl@0
    94
const TLeafDirData& CLeafDirTreeNode::LeafDirData() const
sl@0
    95
    {
sl@0
    96
    return iLeafDirData;
sl@0
    97
    }
sl@0
    98
sl@0
    99
/**
sl@0
   100
Set position of the direcotry this node represents.
sl@0
   101
sl@0
   102
@param  aDirPos the position to be set
sl@0
   103
*/
sl@0
   104
void CLeafDirTreeNode::SetLeafDirData(const TLeafDirData& aLeafDirData)
sl@0
   105
    {
sl@0
   106
    iLeafDirData = aLeafDirData;
sl@0
   107
    }
sl@0
   108
sl@0
   109
/**
sl@0
   110
'Get' function to retrieve dir path store by this node 
sl@0
   111
sl@0
   112
@return the path of the directory
sl@0
   113
*/
sl@0
   114
const TDesC& CLeafDirTreeNode::Path() const
sl@0
   115
    {
sl@0
   116
    return iPath;
sl@0
   117
    }
sl@0
   118
sl@0
   119
/**
sl@0
   120
Test if self is ERoot type
sl@0
   121
sl@0
   122
@return ETrue if self is ERoot
sl@0
   123
        EFalse  if self is of other types
sl@0
   124
*/
sl@0
   125
TBool CLeafDirTreeNode::IsRoot() const 
sl@0
   126
    {
sl@0
   127
    return (iNodeType == ERoot);
sl@0
   128
    }
sl@0
   129
sl@0
   130
/**
sl@0
   131
Test if self is ELeaf type
sl@0
   132
sl@0
   133
@return ETrue if self is ELeaf
sl@0
   134
        EFalse  if self is of other types
sl@0
   135
*/
sl@0
   136
TBool CLeafDirTreeNode::IsLeaf() 
sl@0
   137
    {
sl@0
   138
    return (iNodeType == ELeaf);
sl@0
   139
    }
sl@0
   140
sl@0
   141
/**
sl@0
   142
Test if self is ELeafIntermediary type
sl@0
   143
sl@0
   144
@return ETrue if self is ELeafIntermediary
sl@0
   145
        EFalse  if self is of other types
sl@0
   146
*/
sl@0
   147
TBool CLeafDirTreeNode::IsLeafIntermediary() 
sl@0
   148
    {
sl@0
   149
    return (iNodeType == ELeafIntermediary);
sl@0
   150
    }
sl@0
   151
sl@0
   152
/**
sl@0
   153
Test if self is EPureIntermediary type
sl@0
   154
sl@0
   155
@return ETrue if self is EPureIntermediary
sl@0
   156
        EFalse  if self is of other types
sl@0
   157
*/
sl@0
   158
TBool CLeafDirTreeNode::IsPureIntermediary() 
sl@0
   159
    {
sl@0
   160
    return (iNodeType == EPureIntermediary);
sl@0
   161
    }
sl@0
   162