Diffstat (limited to 'libopie2/opiepim/core/opimaccesstemplate.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimaccesstemplate.h | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index 2deb92a..073d5f9 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h | |||
@@ -90,16 +90,53 @@ public: | |||
90 | virtual T find( UID uid )const; | 90 | virtual T find( UID uid )const; |
91 | virtual T find( UID uid, const QArray<int>&, | 91 | virtual T find( UID uid, const QArray<int>&, |
92 | uint current, typename OTemplateBase<T>::CacheDirection dir = OTemplateBase<T>::Forward )const; | 92 | uint current, typename OTemplateBase<T>::CacheDirection dir = OTemplateBase<T>::Forward )const; |
93 | virtual List sorted( const List&, bool ascending, int sortOrder, | 93 | //@} |
94 | |||
95 | /** | ||
96 | * Get sorted lists.. | ||
97 | * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params: | ||
98 | * @param list of UID's received by allRecords() or others... | ||
99 | * @param sortOrder Setting the sort order defined by enum SortOrder | ||
100 | * @param ascending Sort in ascending order if true, otherwise descending | ||
101 | * @param sortFilter Setting the sort filter defined by enum SortFilter | ||
102 | * @param cat number of category. | ||
103 | */ | ||
104 | virtual List sorted( const List& list, bool ascending, int sortOrder, | ||
94 | int sortFilter, int cat )const; | 105 | int sortFilter, int cat )const; |
95 | virtual List sorted( const List&, bool ascending, int sortOrder, | 106 | |
107 | /** | ||
108 | * Get sorted lists.. | ||
109 | * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params: | ||
110 | * @param list of UID's received by allRecords() or others... | ||
111 | * @param sortOrder Setting the sort order defined by enum SortOrder | ||
112 | * @param ascending Sort in ascending order if true, otherwise descending | ||
113 | * @param sortFilter Setting the sort filter defined by enum SortFilter | ||
114 | * @param cats List of categories. | ||
115 | */ | ||
116 | virtual List sorted( const List& list, bool ascending, int sortOrder, | ||
96 | int sortFilter, const QArray<UID>& cats )const; | 117 | int sortFilter, const QArray<UID>& cats )const; |
118 | |||
119 | /** | ||
120 | * Get sorted lists.. | ||
121 | * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params: | ||
122 | * @param ascending Sort in ascending order if true, otherwise descending | ||
123 | * @param sortOrder Setting the sort order defined by enum SortOrder | ||
124 | * @param sortFilter Setting the sort filter defined by enum SortFilter | ||
125 | * @param cat number of category. | ||
126 | */ | ||
97 | virtual List sorted( bool ascending, int sortOrder, int sortFilter, int cat )const; | 127 | virtual List sorted( bool ascending, int sortOrder, int sortFilter, int cat )const; |
98 | virtual List sorted( bool ascending, int sortOrder, int sortOrder, | ||
99 | const QArray<UID>& cats )const; | ||
100 | //@} | ||
101 | 128 | ||
102 | /** | 129 | /** |
130 | * Get sorted lists.. | ||
131 | * @see OPimContactAccess, OPimTodoAccess and ODateBookAccess regarding more info for the following params: | ||
132 | * @param ascending Sort in ascending order if true, otherwise descending | ||
133 | * @param sortOrder Setting the sort order defined by enum SortOrder | ||
134 | * @param sortFilter Setting the sort filter defined by enum SortFilter | ||
135 | * @param cats List of categories. | ||
136 | */ | ||
137 | virtual List sorted( bool ascending, int sortOrder, int sortFilter, | ||
138 | const QArray<UID>& cats )const; | ||
139 | /** | ||
103 | * (Re)Implementation | 140 | * (Re)Implementation |
104 | */ | 141 | */ |
105 | //@{ | 142 | //@{ |
@@ -129,7 +166,6 @@ public: | |||
129 | //@} | 166 | //@} |
130 | 167 | ||
131 | void setReadAhead( uint count ); | 168 | void setReadAhead( uint count ); |
132 | virtual T cacheFind( int uid )const; | ||
133 | void cache( const T& )const; | 169 | void cache( const T& )const; |
134 | void setSaneCacheSize( int ); | 170 | void setSaneCacheSize( int ); |
135 | 171 | ||
@@ -258,11 +294,6 @@ T OPimAccessTemplate<T>::find( UID uid ) const{ | |||
258 | return t; | 294 | return t; |
259 | } | 295 | } |
260 | 296 | ||
261 | template <class T> | ||
262 | T OPimAccessTemplate<T>::cacheFind( int uid ) const | ||
263 | { | ||
264 | return m_cache.find( uid ); | ||
265 | } | ||
266 | 297 | ||
267 | /** | 298 | /** |
268 | * read ahead cache find method ;) | 299 | * read ahead cache find method ;) |