ISLEman
Public Member Functions | List of all members
QCache< type > Class Template Reference
Inheritance diagram for QCache< type >:
QGCache QCollection

Public Member Functions

 QCache (const QCache< type > &c)
 
 QCache (int maxCost=100, int size=17, bool caseSensitive=TRUE)
 
QCache< type > & operator= (const QCache< type > &c)
 
int maxCost () const
 
int totalCost () const
 
void setMaxCost (int m)
 
uint count () const
 
uint size () const
 
bool isEmpty () const
 
void clear ()
 
bool insert (const char *k, const type *d, int c=1, int p=0)
 
bool remove (const char *k)
 
type * take (const char *k)
 
type * find (const char *k, bool ref=TRUE) const
 
type * operator[] (const char *k) const
 
void statistics () const
 
int hits () const
 
int misses () const
 
- Public Member Functions inherited from QCollection
bool autoDelete () const
 
void setAutoDelete (bool enable)
 

Additional Inherited Members

- Public Types inherited from QCollection
typedef void * Item
 
- Protected Types inherited from QGCache
enum  KeyType { StringKey, AsciiKey, IntKey, PtrKey }
 
- Protected Member Functions inherited from QGCache
 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)
 
- Protected Attributes inherited from QCollection
bool del_item
 

Member Function Documentation

§ clear()

template<class type>
void QCache< type >::clear ( )
inlinevirtual

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

See also
setAutoDelete()

Implements QCollection.

§ count()

template<class type>
uint QCache< type >::count ( ) const
inlinevirtual

Returns the number of objects in the collection.

Implements QCollection.


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