ISLEman
Protected Types | Protected Member Functions | Friends | List of all members
QGCache Class Reference

The QGCache class is an internal class for implementing QCache template classes. More...

#include <qgcache.h>

Inheritance diagram for QGCache:
QCollection QCache< type > QCache< LookupInfo >

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 &)
 
QGCacheoperator= (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)
 

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
 

Detailed Description

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.

Member Function Documentation

§ clear()

void QGCache::clear ( )
protectedvirtual

Removes all objects from the collection. The objects will be deleted if auto-delete has been enabled.

See also
setAutoDelete()

Implements QCollection.

Reimplemented in QCache< LookupInfo >.

§ count()

uint QGCache::count ( ) const
inlineprotectedvirtual

Returns the number of objects in the collection.

Implements QCollection.

Reimplemented in QCache< LookupInfo >.


The documentation for this class was generated from the following files: