predictivesearch/PcsAlgorithm/Algorithm2/src/CPcsCache.cpp
branchRCL_3
changeset 32 2828b4d142c0
parent 0 e686773b3f54
child 58 d4f567ce2e7c
equal deleted inserted replaced
26:0d28c1c5b6dd 32:2828b4d142c0
   189 // Get list of pool elements specific to a pool
   189 // Get list of pool elements specific to a pool
   190 // ----------------------------------------------------------------------------     
   190 // ----------------------------------------------------------------------------     
   191 void CPcsCache::GetContactsForKeyL(TInt aKeyId, RPointerArray<CPcsPoolElement>& aData)
   191 void CPcsCache::GetContactsForKeyL(TInt aKeyId, RPointerArray<CPcsPoolElement>& aData)
   192     {
   192     {
   193     PRINT ( _L("Enter CPcsCache::GetContactsForKeyL") );
   193     PRINT ( _L("Enter CPcsCache::GetContactsForKeyL") );
   194 
   194     CleanupClosePushL( aData );
   195     RPointerArray<CPcsPoolElement> arr = *keyArr[aKeyId];
   195     RPointerArray<CPcsPoolElement> arr = *keyArr[aKeyId];
   196     for (int i = 0; i < arr.Count(); i++)
   196     for (int i = 0; i < arr.Count(); i++)
   197         {
   197         {
   198         CPcsPoolElement* value = arr[i];
   198         CPcsPoolElement* value = arr[i];
   199         aData.AppendL(value);
   199         aData.AppendL(value);
   200         }
   200         }
   201 
   201 
       
   202     CleanupStack::Pop();
   202     PRINT ( _L("End CPcsCache::GetContactsForKeyL") );
   203     PRINT ( _L("End CPcsCache::GetContactsForKeyL") );
   203     }
   204     }
   204 
   205 
   205 // ----------------------------------------------------------------------------
   206 // ----------------------------------------------------------------------------
   206 // CPcsCache::GetAllContentsL
   207 // CPcsCache::GetAllContentsL
   207 // Get all data elements in this cache
   208 // Get all data elements in this cache
   208 // ----------------------------------------------------------------------------     
   209 // ----------------------------------------------------------------------------     
   209 void CPcsCache::GetAllContentsL(RPointerArray<CPsData>& aData)
   210 void CPcsCache::GetAllContentsL(RPointerArray<CPsData>& aData)
   210     {
   211     {
   211     PRINT ( _L("Enter CPcsCache::GetAllContentsL") );
   212     PRINT ( _L("Enter CPcsCache::GetAllContentsL") );
   212 
   213     CleanupClosePushL( aData );
   213     for (int i = 0; i < masterPool.Count(); i++)
   214     for (int i = 0; i < masterPool.Count(); i++)
   214         {
   215         {
   215         CPsData* value = masterPool[i];
   216         CPsData* value = masterPool[i];
   216         aData.AppendL(value);
   217         aData.AppendL(value);
   217         }
   218         }
   218 
   219     CleanupStack::Pop();
   219     PRINT ( _L("End CPcsCache::GetAllContentsL") );
   220     PRINT ( _L("End CPcsCache::GetAllContentsL") );
   220     }
   221     }
   221 
   222 
   222 // ----------------------------------------------------------------------------
   223 // ----------------------------------------------------------------------------
   223 // CPcsCache::AddToPool
   224 // CPcsCache::AddToPool