QCache< Key, T > Class Template Reference
#include <qcache.h>
template<class Key, class T>
class QCache< Key, T >
Definition at line 54 of file qcache.h.
Definition at line 134 of file qcache.h.
135 :
f(0), l(0), unused(0), mx(amaxCost), total(0) {}
Definition at line 143 of file qcache.h.
144 { mx = m; trim(mx); }
QList<Key> keys |
( |
| ) |
const |
|
inline |
Definition at line 112 of file qcache.h.
112 {
return hash.
keys(); }
QList< Key > keys() const
Definition at line 138 of file qcache.h.
139 {
while (
f) {
delete f->t;
f =
f->n; }
140 hash.
clear(); l = 0; total = 0; }
bool insert |
( |
const Key & |
key, |
|
|
T * |
object, |
|
|
int |
cost = 1 |
|
) |
| |
Definition at line 181 of file qcache.h.
189 Node sn(aobject, acost);
193 n->keyPtr = &i.
key();
const T value(const Key &key) const
iterator insert(const Key &key, const T &value)
const Key key(const T &value) const
T * object |
( |
const Key & |
key | ) |
const |
|
inline |
bool contains |
( |
const Key & |
key | ) |
const |
|
inline |
Definition at line 118 of file qcache.h.
bool contains(const Key &key) const
T * operator[] |
( |
const Key & |
key | ) |
const |
|
inline |
Definition at line 151 of file qcache.h.
T * object(const Key &key) const
bool remove |
( |
const Key & |
key | ) |
|
|
inline |
Definition at line 155 of file qcache.h.
iterator find(const Key &key)
const_iterator constEnd() const
T * take |
( |
const Key & |
key | ) |
|
|
inline |
Definition at line 167 of file qcache.h.
iterator find(const Key &key)
The documentation for this class was generated from the following file: