equal
deleted
inserted
replaced
39 // Merges all the respective data store result sets to single set in sorted order. |
39 // Merges all the respective data store result sets to single set in sorted order. |
40 // ---------------------------------------------------------------------------- |
40 // ---------------------------------------------------------------------------- |
41 void CPcsAlgorithm1Utils::FormCompleteSearchResultsL(RPointerArray<CPSDATA_R_PTR_ARRAY>& aSearchResultsArr, |
41 void CPcsAlgorithm1Utils::FormCompleteSearchResultsL(RPointerArray<CPSDATA_R_PTR_ARRAY>& aSearchResultsArr, |
42 RPointerArray<CPsData>& aSearchResults) |
42 RPointerArray<CPsData>& aSearchResults) |
43 { |
43 { |
|
44 CleanupClosePushL( aSearchResults ); |
44 TInt maxIndex = 0; |
45 TInt maxIndex = 0; |
45 TInt maxValue = aSearchResultsArr[maxIndex]->Count(); |
46 TInt maxValue = aSearchResultsArr[maxIndex]->Count(); |
46 TLinearOrder<CPsData> rule( CPcsAlgorithm1Utils::CompareDataBySortOrderL ); |
47 TLinearOrder<CPsData> rule( CPcsAlgorithm1Utils::CompareDataBySortOrderL ); |
47 |
48 |
48 // Find the largest array in aSearchResultsArr |
49 // Find the largest array in aSearchResultsArr |
72 { |
73 { |
73 aSearchResults.InsertInOrderAllowRepeatsL((*(aSearchResultsArr[i]))[j], rule); |
74 aSearchResults.InsertInOrderAllowRepeatsL((*(aSearchResultsArr[i]))[j], rule); |
74 } |
75 } |
75 } |
76 } |
76 } |
77 } |
|
78 CleanupStack::Pop(); |
77 } |
79 } |
78 |
80 |
79 // ---------------------------------------------------------------------------- |
81 // ---------------------------------------------------------------------------- |
80 // CPcsAlgorithm1Utils::CompareByLength() |
82 // CPcsAlgorithm1Utils::CompareByLength() |
81 // Compare by length. |
83 // Compare by length. |
328 // CPcsAlgorithm1Utils::AppendMatchToSeqL |
330 // CPcsAlgorithm1Utils::AppendMatchToSeqL |
329 // ---------------------------------------------------------------------------- |
331 // ---------------------------------------------------------------------------- |
330 void CPcsAlgorithm1Utils::AppendMatchToSeqL( |
332 void CPcsAlgorithm1Utils::AppendMatchToSeqL( |
331 RPointerArray<TDesC>& aMatchSeq, const TDesC& aMatch ) |
333 RPointerArray<TDesC>& aMatchSeq, const TDesC& aMatch ) |
332 { |
334 { |
|
335 CleanupResetAndDestroyPushL( aMatchSeq ); |
|
336 |
333 HBufC* seq = aMatch.AllocLC(); |
337 HBufC* seq = aMatch.AllocLC(); |
334 seq->Des().UpperCase(); |
338 seq->Des().UpperCase(); |
335 TIdentityRelation<TDesC> rule(CompareExact); |
339 TIdentityRelation<TDesC> rule(CompareExact); |
336 if ( aMatchSeq.Find(seq, rule) == KErrNotFound ) |
340 if ( aMatchSeq.Find(seq, rule) == KErrNotFound ) |
337 { |
341 { |
340 } |
344 } |
341 else |
345 else |
342 { |
346 { |
343 CleanupStack::PopAndDestroy( seq ); |
347 CleanupStack::PopAndDestroy( seq ); |
344 } |
348 } |
|
349 CleanupStack::Pop( &aMatchSeq ); |
345 } |
350 } |
346 |
351 |
347 // End of File |
352 // End of File |
348 |
353 |