Protected Member Functions | Protected Attributes | List of all members
QGCacheIterator Class Reference

An internal class for implementing QCacheIterator and QIntCacheIterator. More...

#include <qgcache.h>

Inheritance diagram for QGCacheIterator:
QCacheIterator< type >

Protected Member Functions

 QGCacheIterator (const QGCache &)
 
 QGCacheIterator (const QGCacheIterator &)
 
 ~QGCacheIterator ()
 
QGCacheIteratoroperator= (const QGCacheIterator &)
 
uint count () const
 
bool atFirst () const
 
bool atLast () const
 
QCollection::Item toFirst ()
 
QCollection::Item toLast ()
 
QCollection::Item get () const
 
QString getKeyString () const
 
const char * getKeyAscii () const
 
intptr_t getKeyInt () const
 
QCollection::Item operator() ()
 
QCollection::Item operator++ ()
 
QCollection::Item operator+= (uint)
 
QCollection::Item operator-- ()
 
QCollection::Item operator-= (uint)
 

Protected Attributes

QCListItit
 

Detailed Description

An internal class for implementing QCacheIterator and QIntCacheIterator.

QGCacheIterator is a strictly internal class that does the heavy work for QCacheIterator and QIntCacheIterator.

Definition at line 100 of file qgcache.h.

Constructor & Destructor Documentation

QGCacheIterator::QGCacheIterator ( const QGCache c)
protected

Definition at line 687 of file qgcache.cpp.

688 {
689  it = new QCListIt( c.lruList );
690 #if defined(DEBUG)
691  ASSERT( it != 0 );
692 #endif
693 }
QCList * lruList
Definition: qgcache.h:92
QCListIt * it
Definition: qgcache.h:126
#define ASSERT(x)
Definition: qglobal.h:590
QGCacheIterator::QGCacheIterator ( const QGCacheIterator ci)
protected

Definition at line 700 of file qgcache.cpp.

701 {
702  it = new QCListIt( ci.it );
703 #if defined(DEBUG)
704  ASSERT( it != 0 );
705 #endif
706 }
QCListIt * it
Definition: qgcache.h:126
#define ASSERT(x)
Definition: qglobal.h:590
QGCacheIterator::~QGCacheIterator ( )
protected

Definition at line 713 of file qgcache.cpp.

714 {
715  delete it;
716 }
QCListIt * it
Definition: qgcache.h:126

Member Function Documentation

bool QGCacheIterator::atFirst ( ) const
protected

Definition at line 744 of file qgcache.cpp.

745 {
746  return it->atFirst();
747 }
QCListIt * it
Definition: qgcache.h:126
bool atFirst() const
bool QGCacheIterator::atLast ( ) const
protected

Definition at line 754 of file qgcache.cpp.

755 {
756  return it->atLast();
757 }
QCListIt * it
Definition: qgcache.h:126
bool atLast() const
uint QGCacheIterator::count ( ) const
protected

Definition at line 734 of file qgcache.cpp.

735 {
736  return it->count();
737 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item QGCacheIterator::get ( ) const
protected

Definition at line 786 of file qgcache.cpp.

787 {
788  QCacheItem *item = it->current();
789  return item ? item->data : 0;
790 }
type * current() const
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67
const char * QGCacheIterator::getKeyAscii ( ) const
protected

Definition at line 808 of file qgcache.cpp.

809 {
810  QCacheItem *item = it->current();
811  return item ? (const char *)item->key : 0;
812 }
type * current() const
void * key
Definition: qgcache.cpp:66
QCListIt * it
Definition: qgcache.h:126
intptr_t QGCacheIterator::getKeyInt ( ) const
protected

Definition at line 819 of file qgcache.cpp.

820 {
821  QCacheItem *item = it->current();
822  return item ? (intptr_t)item->key : 0;
823 }
type * current() const
void * key
Definition: qgcache.cpp:66
QCListIt * it
Definition: qgcache.h:126
QString QGCacheIterator::getKeyString ( ) const
protected

Definition at line 797 of file qgcache.cpp.

798 {
799  QCacheItem *item = it->current();
800  return item ? *((QString*)item->key) : QString::null;
801 }
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
type * current() const
void * key
Definition: qgcache.cpp:66
QCListIt * it
Definition: qgcache.h:126
null
Definition: demo.py:50
QCollection::Item QGCacheIterator::operator() ( )
protected

Definition at line 830 of file qgcache.cpp.

831 {
832  QCacheItem *item = it->operator()();
833  return item ? item->data : 0;
834 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67
QCollection::Item QGCacheIterator::operator++ ( )
protected

Definition at line 841 of file qgcache.cpp.

842 {
843  QCacheItem *item = it->operator++();
844  return item ? item->data : 0;
845 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67
QCollection::Item QGCacheIterator::operator+= ( uint  jump)
protected

Definition at line 852 of file qgcache.cpp.

853 {
854  QCacheItem *item = it->operator+=(jump);
855  return item ? item->data : 0;
856 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67
QCollection::Item QGCacheIterator::operator-- ( )
protected

Definition at line 863 of file qgcache.cpp.

864 {
865  QCacheItem *item = it->operator--();
866  return item ? item->data : 0;
867 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67
QCollection::Item QGCacheIterator::operator-= ( uint  jump)
protected

Definition at line 874 of file qgcache.cpp.

875 {
876  QCacheItem *item = it->operator-=(jump);
877  return item ? item->data : 0;
878 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67
QGCacheIterator & QGCacheIterator::operator= ( const QGCacheIterator ci)
protected

Definition at line 723 of file qgcache.cpp.

724 {
725  *it = *ci.it;
726  return *this;
727 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item QGCacheIterator::toFirst ( )
protected

Definition at line 764 of file qgcache.cpp.

765 {
766  QCacheItem *item = it->toFirst();
767  return item ? item->data : 0;
768 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67
QCollection::Item QGCacheIterator::toLast ( )
protected

Definition at line 775 of file qgcache.cpp.

776 {
777  QCacheItem *item = it->toLast();
778  return item ? item->data : 0;
779 }
QCListIt * it
Definition: qgcache.h:126
QCollection::Item data
Definition: qgcache.cpp:67

Member Data Documentation

QCListIt* QGCacheIterator::it
protected

Definition at line 126 of file qgcache.h.


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