Lines Matching refs:TKey
35 template <typename TKey, typename TValue>
44 void setOnEntryRemovedListener(OnEntryRemoved<TKey, TValue>* listener);
46 const TValue& get(const TKey& key);
47 bool put(const TKey& key, const TValue& value);
48 bool remove(const TKey& key);
55 Iterator(const LruCache<TKey, TValue>& cache): mCache(cache), mIndex(-1) { in Iterator() argument
71 const TKey& key() const { in key()
75 const LruCache<TKey, TValue>& mCache;
83 TKey key;
88 Entry(TKey key_, TValue value_) : key(key_), value(value_), parent(NULL), child(NULL) { in Entry()
90 const TKey& getKey() const { return key; } in getKey()
97 UniquePtr<BasicHashtable<TKey, Entry> > mTable;
98 OnEntryRemoved<TKey, TValue>* mListener;
106 template <typename TKey, typename TValue>
107 LruCache<TKey, TValue>::LruCache(uint32_t maxCapacity) in LruCache()
108 : mTable(new BasicHashtable<TKey, Entry>) in LruCache()
121 template <typename TKey, typename TValue>
122 size_t LruCache<TKey, TValue>::size() const { in size()
126 template <typename TKey, typename TValue>
127 const TValue& LruCache<TKey, TValue>::get(const TKey& key) { in get()
139 template <typename TKey, typename TValue>
140 bool LruCache<TKey, TValue>::put(const TKey& key, const TValue& value) { in put()
162 template <typename TKey, typename TValue>
163 bool LruCache<TKey, TValue>::remove(const TKey& key) { in remove()
178 template <typename TKey, typename TValue>
179 bool LruCache<TKey, TValue>::removeOldest() { in removeOldest()
187 template <typename TKey, typename TValue>
188 const TValue& LruCache<TKey, TValue>::peekOldestValue() { in peekOldestValue()
195 template <typename TKey, typename TValue>
196 void LruCache<TKey, TValue>::clear() { in clear()
207 template <typename TKey, typename TValue>
208 void LruCache<TKey, TValue>::attachToCache(Entry& entry) { in attachToCache()
218 template <typename TKey, typename TValue>
219 void LruCache<TKey, TValue>::detachFromCache(Entry& entry) { in detachFromCache()
235 template <typename TKey, typename TValue>
236 void LruCache<TKey, TValue>::rehash(size_t newCapacity) { in rehash()
237 UniquePtr<BasicHashtable<TKey, Entry> > oldTable(mTable.release()); in rehash()
242 mTable.reset(new BasicHashtable<TKey, Entry>(newCapacity)); in rehash()