1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Declaration of the TApListItemKey class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TAPLISTITEMKEY_H |
|
20 #define TAPLISTITEMKEY_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32std.h> |
|
25 #include <ApEngineVer.h> |
|
26 |
|
27 // CLASS DECLARATION |
|
28 /** |
|
29 * A key for sorting CApListItems according to their name |
|
30 * The pointer to the list is not owned |
|
31 */ |
|
32 NONSHARABLE_CLASS( TApListItemNameKey ) : public TKeyArrayFix |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Sets the list to sort |
|
37 * @param aPtr A pointer to the l;ist to sort |
|
38 */ |
|
39 void SetPtr( CApListItemList* aPtr ); |
|
40 |
|
41 // From TKeyArrayFix |
|
42 virtual TInt Compare( TInt aLeft,TInt aRight ) const; |
|
43 |
|
44 // From TKeyArrayFix |
|
45 virtual TAny* At( TInt anIndex ) const; |
|
46 |
|
47 /** |
|
48 * Constructor |
|
49 */ |
|
50 TApListItemNameKey( TBool aAscending = ETrue ); |
|
51 |
|
52 protected: |
|
53 CApListItemList* iList; |
|
54 TBool iAscending; |
|
55 }; |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 /** |
|
61 * A key for sorting CApListItems according to their UID |
|
62 * The pointer to the list is not owned |
|
63 */ |
|
64 NONSHARABLE_CLASS( TApListItemUidKey ) : public TKeyArrayFix |
|
65 { |
|
66 public: |
|
67 /** |
|
68 * Sets the list to sort |
|
69 * @param aPtr A pointer to the l;ist to sort |
|
70 */ |
|
71 void SetPtr( CApListItemList* aPtr ); |
|
72 |
|
73 // From TKeyArrayFix |
|
74 virtual TInt Compare( TInt aLeft,TInt aRight ) const; |
|
75 |
|
76 // From TKeyArrayFix |
|
77 virtual TAny* At( TInt anIndex ) const; |
|
78 |
|
79 /** |
|
80 * Constructor |
|
81 */ |
|
82 TApListItemUidKey( TBool aAscending = ETrue ); |
|
83 |
|
84 |
|
85 protected: |
|
86 CApListItemList* iList; |
|
87 TBool iAscending; |
|
88 }; |
|
89 |
|
90 #endif |
|
91 |
|
92 // End of File |
|