|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __AGSINDEXITERATOR_H__ |
|
17 #define __AGSINDEXITERATOR_H__ |
|
18 |
|
19 #include "agsiterator.h" |
|
20 |
|
21 // ------------------------------Referenced classes----------------------------- |
|
22 class CAgnSimpleEntry; |
|
23 class CAgnSimpleEntryTable; |
|
24 class TAgnFilter; |
|
25 |
|
26 // ----------------------------TAgnTodoNonRptIterator--------------------------- |
|
27 // Iterator - Non repeating todos |
|
28 // |
|
29 class TAgnTodoNonRptIterator : public TAgnIterator |
|
30 /** |
|
31 @internalAll |
|
32 @released |
|
33 */ |
|
34 { |
|
35 public: |
|
36 TAgnTodoNonRptIterator(); |
|
37 TAgnTodoNonRptIterator(CAgnIndex* aIndex,const TAgnFilter& aFilter); |
|
38 |
|
39 virtual TBool GotoL(TTime& aKeyValue); |
|
40 virtual TBool GotoLessOrEqualL(TTime& aKeyValue); |
|
41 }; |
|
42 |
|
43 |
|
44 // ----------------------------TAgnEntryDateIterator---------------------------- |
|
45 // Compound Entry Iterator |
|
46 // |
|
47 class TAgnEntryDateIterator |
|
48 /** |
|
49 @internalAll |
|
50 @released |
|
51 */ |
|
52 { |
|
53 public: |
|
54 TAgnEntryDateIterator(CAgnSimpleEntryTable& aEntryInfoTable, const TTime& aUndatedTodoTime, const TAgnFilter& aFilter); |
|
55 virtual ~TAgnEntryDateIterator(); |
|
56 |
|
57 const CAgnSimpleEntry& CurrentElement() const; |
|
58 const TTime& CurrentKey() const; |
|
59 void StartL(); |
|
60 void NextL(); |
|
61 void PreviousL(); |
|
62 TBool AtEnd(); |
|
63 TBool AtStart(); |
|
64 TBool GotoL(TTime& aKeyValue); |
|
65 TBool GotoLessOrEqualL(TTime& aKeyValue); |
|
66 TBool SetCurrent(); |
|
67 TBool SetCurrentLessOrEqual(); |
|
68 |
|
69 private: |
|
70 |
|
71 TAgnIterator* iIteratorsInUse[8]; // pointers to those iterators below that are selected by aFilter |
|
72 TAgnIterator iNonRptFixedIter; |
|
73 TAgnIterator iNonRptFloatingIter; |
|
74 TAgnIterator iRptFixedIter; |
|
75 TAgnIterator iRptFloatingIter; |
|
76 TAgnTodoNonRptIterator iTodoNonRptFixedIter; |
|
77 TAgnTodoNonRptIterator iTodoNonRptFloatingIter; |
|
78 TAgnIterator iTodoRptFixedIter; |
|
79 TAgnIterator iTodoRptFloatingIter; |
|
80 |
|
81 TInt iCount; // number of iterators to use (as per filter) |
|
82 TInt iCurrent; // iterator being used |
|
83 TTime iCurrentKey; |
|
84 TTime iPreviousKey; |
|
85 |
|
86 CAgnIndex* iArray; |
|
87 }; |
|
88 |
|
89 |
|
90 #endif |