The QGCache class is an internal class for implementing QCache template classes. More...
#include <qgcache.h>
Protected Types | |
enum | KeyType { StringKey, AsciiKey, IntKey, PtrKey } |
Protected Member Functions | |
QGCache (int maxCost, uint size, KeyType kt, bool caseSensitive, bool copyKeys) | |
QGCache (const QGCache &) | |
~QGCache () | |
QGCache & | operator= (const QGCache &) |
uint | count () const |
uint | size () const |
int | maxCost () const |
int | totalCost () const |
void | setMaxCost (int maxCost) |
void | clear () |
bool | insert_string (const QString &key, QCollection::Item, int cost, int priority) |
bool | insert_other (const char *key, QCollection::Item, int cost, int priority) |
bool | remove_string (const QString &key) |
bool | remove_other (const char *key) |
QCollection::Item | take_string (const QString &key) |
QCollection::Item | take_other (const char *key) |
QCollection::Item | find_string (const QString &key, bool ref=TRUE) const |
QCollection::Item | find_other (const char *key, bool ref=TRUE) const |
void | statistics () const |
int | hits () const |
int | misses () const |
Protected Member Functions inherited from QCollection | |
QCollection () | |
QCollection (const QCollection &) | |
virtual | ~QCollection () |
virtual Item | newItem (Item) |
virtual void | deleteItem (Item) |
Private Member Functions | |
bool | makeRoomFor (int cost, int priority=-1) |
Private Attributes | |
KeyType | keytype |
QCList * | lruList |
QCDict * | dict |
int | mCost |
int | tCost |
bool | copyk |
Friends | |
class | QGCacheIterator |
Additional Inherited Members | |
Public Types inherited from QCollection | |
typedef void * | Item |
Public Member Functions inherited from QCollection | |
bool | autoDelete () const |
void | setAutoDelete (bool enable) |
Protected Attributes inherited from QCollection | |
bool | del_item |
The QGCache class is an internal class for implementing QCache template classes.
QGCache is a strictly internal class that acts as a base class for the collection classes QCache and QIntCache.
|
protected |
Enumerator | |
---|---|
StringKey | |
AsciiKey | |
IntKey | |
PtrKey |
|
protected |
Definition at line 234 of file qgcache.cpp.
|
protected |
Definition at line 263 of file qgcache.cpp.
|
protected |
Definition at line 276 of file qgcache.cpp.
|
protectedvirtual |
Removes all objects from the collection. The objects will be deleted if auto-delete has been enabled.
Implements QCollection.
Reimplemented in QCache< LookupInfo >.
Definition at line 493 of file qgcache.cpp.
|
inlineprotectedvirtual |
Returns the number of objects in the collection.
Implements QCollection.
Reimplemented in QCache< LookupInfo >.
Definition at line 66 of file qgcache.h.
|
protected |
Definition at line 549 of file qgcache.cpp.
|
protected |
Definition at line 525 of file qgcache.cpp.
|
protected |
Definition at line 658 of file qgcache.cpp.
|
protected |
Definition at line 380 of file qgcache.cpp.
|
protected |
Definition at line 348 of file qgcache.cpp.
|
private |
Definition at line 574 of file qgcache.cpp.
|
protected |
Definition at line 663 of file qgcache.cpp.
Definition at line 288 of file qgcache.cpp.
|
protected |
Definition at line 431 of file qgcache.cpp.
Definition at line 420 of file qgcache.cpp.
|
protected |
Definition at line 326 of file qgcache.cpp.
|
inlineprotected |
Definition at line 67 of file qgcache.h.
|
protected |
Definition at line 628 of file qgcache.cpp.
|
protected |
Definition at line 466 of file qgcache.cpp.
|
protected |
Definition at line 445 of file qgcache.cpp.
|
friend |