Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

QCList Class Reference

Inheritance diagram for QCList:

Inheritance graph
[legend]
Collaboration diagram for QCList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QCList ()
 ~QCList ()
void insert (QCacheItem *)
void insert (int, QCacheItem *)
void take (QCacheItem *)
void reference (QCacheItem *)
void setAutoDelete (bool del)
bool removeFirst ()
bool removeLast ()
QCacheItemfirst ()
QCacheItemlast ()
QCacheItemprev ()
QCacheItemnext ()

Friends

class QGCacheIterator
class QCListIt

Constructor & Destructor Documentation

QCList::QCList  )  [inline]
 

Definition at line 84 of file qgcache.cpp.

QCList::~QCList  ) 
 

Definition at line 115 of file qgcache.cpp.

References QPtrList< QCacheItem >::count(), and Q_ASSERT.


Member Function Documentation

QCacheItem* QCList::first  )  [inline]
 

Returns the first list item. Sets this to current.

Reimplemented from QPtrList< QCacheItem >.

Definition at line 97 of file qgcache.cpp.

References QPtrList< type >::first().

Referenced by QGCache::clear(), and insert().

void QCList::insert int  ,
QCacheItem
[inline]
 

Definition at line 140 of file qgcache.cpp.

References QPtrList< QCacheItem >::currentNode(), QPtrList< type >::insert(), QCacheItem::node, and Q_ASSERT.

void QCList::insert QCacheItem  ) 
 

Definition at line 123 of file qgcache.cpp.

References QPtrList< QCacheItem >::append(), QPtrList< QCacheItem >::at(), QPtrList< QCacheItem >::currentNode(), first(), QPtrList< type >::insert(), next(), QCacheItem::node, QCacheItem::priority, Q_ASSERT, and QCacheItem::skipPriority.

Referenced by QGCache::insert_other(), and QGCache::insert_string().

QCacheItem* QCList::last  )  [inline]
 

Returns the last list item. Sets this to current.

Reimplemented from QPtrList< QCacheItem >.

Definition at line 98 of file qgcache.cpp.

References QPtrList< type >::last().

Referenced by QGCache::makeRoomFor().

QCacheItem* QCList::next  )  [inline]
 

Returns the next list item (after current). Sets this to current.

Reimplemented from QPtrList< QCacheItem >.

Definition at line 100 of file qgcache.cpp.

References QPtrList< type >::next().

Referenced by insert().

QCacheItem* QCList::prev  )  [inline]
 

Returns the previous list item (before current). Sets this to current.

Reimplemented from QPtrList< QCacheItem >.

Definition at line 99 of file qgcache.cpp.

References QPtrList< type >::prev().

Referenced by QGCache::makeRoomFor().

void QCList::reference QCacheItem  )  [inline]
 

Definition at line 162 of file qgcache.cpp.

References QCacheItem::node, QCacheItem::priority, Q_ASSERT, QGList::relinkNode(), and QCacheItem::skipPriority.

Referenced by QGCache::find_other(), and QGCache::find_string().

bool QCList::removeFirst  )  [inline]
 

Removes the first item in the list.

Reimplemented from QPtrList< QCacheItem >.

Definition at line 94 of file qgcache.cpp.

References QPtrList< type >::removeFirst().

Referenced by QGCache::clear().

bool QCList::removeLast  )  [inline]
 

Removes the last item in the list.

Reimplemented from QPtrList< QCacheItem >.

Definition at line 95 of file qgcache.cpp.

References QPtrList< type >::removeLast().

Referenced by QGCache::makeRoomFor().

void QCList::setAutoDelete bool  del  )  [inline]
 

Sets the collection to auto-delete its contents if enable is TRUE and to never delete them if enable is FALSE.

If auto-deleting is turned on, all the items in a collection are deleted when the collection itself is deleted. This is convenient if the collection has the only pointer to the items.

The default setting is FALSE, for safety. If you turn it on, be careful about copying the collection - you might find yourself with two collections deleting the same items.

Note that the auto-delete setting may also affect other functions in subclasses. For example, a subclass that has a remove() function will remove the item from its data structure, and if auto-delete is enabled, will also delete the item.

See also:
autoDelete()

Reimplemented from QPtrCollection.

Definition at line 92 of file qgcache.cpp.

References QPtrCollection::setAutoDelete().

Referenced by QGCache::QGCache().

void QCList::take QCacheItem  ) 
 

Definition at line 150 of file qgcache.cpp.

References QCacheItem::node, Q_ASSERT, and QPtrList< QCacheItem >::takeNode().

Referenced by QGCache::take_other(), and QGCache::take_string().


Friends And Related Function Documentation

friend class QCListIt [friend]
 

Definition at line 82 of file qgcache.cpp.

friend class QGCacheIterator [friend]
 

Definition at line 81 of file qgcache.cpp.


The documentation for this class was generated from the following file:
Generated on Sat Nov 5 17:46:13 2005 for OPIE by  doxygen 1.4.2