template<class dictbase, class type>
Finds the item associated with key k, returning zero if not found. Marks the item as most recently used if tofront is true. Definition at line 226 of file FXLRUCache.h. Referenced by FX::FXLRUCache< FX::QDict< type > >::operator[](). 00227 { 00228 CacheItem *ci=(CacheItem *) dictbase::find(k); 00229 if(!ci) 00230 { 00231 ++stats.misses; 00232 return 0; 00233 } 00234 ++stats.hits; 00235 if(tofront) 00236 { 00237 cache.splice(cache.begin(), cache, ci->myit); 00238 // ci->myit=cache.begin(); 00239 } 00240 return ci->itemPtr(); 00241 }
|