Eneboo - Documentación para desarrolladores
Tipos protegidos | Métodos protegidos | Amigas
Referencia de la Clase QGCache

The QGCache class is an internal class for implementing QCache template classes. Más...

#include <qgcache.h>

Diagrama de herencias de QGCache
QPtrCollection QPtrCollection QAsciiCache< type > QAsciiCache< type > QCache< type > QCache< type > QCache< QPixmap > QCache< QPixmap > QIntCache< type > QIntCache< type >

Lista de todos los miembros.

Tipos protegidos

enum  KeyType {
  StringKey, AsciiKey, IntKey, PtrKey,
  StringKey, AsciiKey, IntKey, PtrKey
}
enum  KeyType {
  StringKey, AsciiKey, IntKey, PtrKey,
  StringKey, AsciiKey, IntKey, PtrKey
}

Métodos protegidos

 QGCache (int maxCost, uint size, KeyType kt, bool caseSensitive, bool copyKeys)
 QGCache (const QGCache &)
 ~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, QPtrCollection::Item, int cost, int priority)
bool insert_other (const char *key, QPtrCollection::Item, int cost, int priority)
bool remove_string (const QString &key)
bool remove_other (const char *key)
QPtrCollection::Item take_string (const QString &key)
QPtrCollection::Item take_other (const char *key)
QPtrCollection::Item find_string (const QString &key, bool ref=TRUE) const
QPtrCollection::Item find_other (const char *key, bool ref=TRUE) const
void statistics () const
 QGCache (int maxCost, uint size, KeyType kt, bool caseSensitive, bool copyKeys)
 QGCache (const QGCache &)
 ~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, QPtrCollection::Item, int cost, int priority)
bool insert_other (const char *key, QPtrCollection::Item, int cost, int priority)
bool remove_string (const QString &key)
bool remove_other (const char *key)
QPtrCollection::Item take_string (const QString &key)
QPtrCollection::Item take_other (const char *key)
QPtrCollection::Item find_string (const QString &key, bool ref=TRUE) const
QPtrCollection::Item find_other (const char *key, bool ref=TRUE) const
void statistics () const

Amigas

class QGCacheIterator

Descripción detallada

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


Documentación de las enumeraciones miembro de la clase

enum QGCache::KeyType [protected]
Valores de enumeraciones:
StringKey 
AsciiKey 
IntKey 
PtrKey 
StringKey 
AsciiKey 
IntKey 
PtrKey 
enum QGCache::KeyType [protected]
Valores de enumeraciones:
StringKey 
AsciiKey 
IntKey 
PtrKey 
StringKey 
AsciiKey 
IntKey 
PtrKey 

Documentación del constructor y destructor

QGCache::QGCache ( int  maxCost,
uint  size,
KeyType  kt,
bool  caseSensitive,
bool  copyKeys 
) [protected]

Constructs a cache. The maximum cost of the cache is given by maxCost and the size by size. The key type is kt which may be StringKey, AsciiKey, IntKey or PtrKey. The case-sensitivity of lookups is set with caseSensitive. Keys are copied if copyKeys is TRUE.

QGCache::QGCache ( const QGCache ) [protected]

Cannot copy a cache.

QGCache::~QGCache ( ) [protected]

Removes all items from the cache and destroys it.

QGCache::QGCache ( int  maxCost,
uint  size,
KeyType  kt,
bool  caseSensitive,
bool  copyKeys 
) [protected]
QGCache::QGCache ( const QGCache ) [protected]
QGCache::~QGCache ( ) [protected]

Documentación de las funciones miembro

void QGCache::clear ( void  ) [protected, virtual]
void QGCache::clear ( void  ) [protected, virtual]
uint QGCache::count ( ) const [protected, virtual]
uint QGCache::count ( ) const [protected, virtual]
QPtrCollection::Item QGCache::find_other ( const char *  key,
bool  ref = TRUE 
) const [protected]

Finds an item for key in the cache and adds a reference if ref is TRUE.

QPtrCollection::Item QGCache::find_other ( const char *  key,
bool  ref = TRUE 
) const [protected]
QPtrCollection::Item QGCache::find_string ( const QString key,
bool  ref = TRUE 
) const [protected]

Finds an item for key in the cache and adds a reference if ref is TRUE.

QPtrCollection::Item QGCache::find_string ( const QString key,
bool  ref = TRUE 
) const [protected]
bool QGCache::insert_other ( const char *  key,
QPtrCollection::Item  data,
int  cost,
int  priority 
) [protected]
bool QGCache::insert_other ( const char *  key,
QPtrCollection::Item  ,
int  cost,
int  priority 
) [protected]
bool QGCache::insert_string ( const QString key,
QPtrCollection::Item  data,
int  cost,
int  priority 
) [protected]

Inserts an item with data data into the cache using key key. The item has cost cost and priority priority.

Atención:
If this function returns FALSE, you must delete data yourself. Additionally, be very careful about using data after calling this function, as any other insertions into the cache, from anywhere in the application, or within Qt itself, could cause the data to be discarded from the cache, and the pointer to become invalid.
bool QGCache::insert_string ( const QString key,
QPtrCollection::Item  ,
int  cost,
int  priority 
) [protected]
int QGCache::maxCost ( ) const [inline, protected]
int QGCache::maxCost ( ) const [inline, protected]
QGCache & QGCache::operator= ( const QGCache ) [protected]

Cannot assign a cache.

QGCache& QGCache::operator= ( const QGCache ) [protected]
bool QGCache::remove_other ( const char *  key) [protected]
bool QGCache::remove_other ( const char *  key) [protected]
bool QGCache::remove_string ( const QString key) [protected]
bool QGCache::remove_string ( const QString key) [protected]

Removes the item with key key from the cache. Returns TRUE if the item was removed; otherwise returns FALSE.

void QGCache::setMaxCost ( int  maxCost) [protected]
void QGCache::setMaxCost ( int  maxCost) [protected]
uint QGCache::size ( ) const [protected]
uint QGCache::size ( ) const [protected]
void QGCache::statistics ( ) const [protected]
void QGCache::statistics ( ) const [protected]
QPtrCollection::Item QGCache::take_other ( const char *  key) [protected]

Takes the item with key key out of the cache. The item is not deleted. If no item has this key 0 is returned.

QPtrCollection::Item QGCache::take_other ( const char *  key) [protected]
QPtrCollection::Item QGCache::take_string ( const QString key) [protected]
QPtrCollection::Item QGCache::take_string ( const QString key) [protected]

Takes the item with key key out of the cache. The item is not deleted. If no item has this key 0 is returned.

int QGCache::totalCost ( ) const [inline, protected]
int QGCache::totalCost ( ) const [inline, protected]

Documentación de las funciones relacionadas y clases amigas

QGCacheIterator [friend]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'