#include </home/clem/local/src/opie/qmake/include/qglist.h>
Inheritance diagram for QGList:


For internal use only.
QGList is a strictly internal class that acts as a base class for several collection classes; QPtrList, QPtrQueue and QPtrStack.
QGList has some virtual functions that can be reimplemented to customize the subclasses, namely compareItems(), read() and write. Normally, you do not have to reimplement any of these functions. If you still want to reimplement them, see the QStrList class (qstrlist.h) for an example.
Definition at line 60 of file qglist.h.
|
|
Constructs an empty list. Definition at line 219 of file qglist.cpp. References curIndex, curNode, firstNode, iterators, lastNode, and numNodes. |
|
|
Constructs a copy of list. Definition at line 231 of file qglist.cpp. References append(), curIndex, curNode, QLNode::data, firstNode, iterators, lastNode, QLNode::next, and numNodes. |
|
|
Removes all items from the list and destroys the list. Definition at line 249 of file qglist.cpp. |
|
|
Inserts item d at the end of the list. Definition at line 402 of file qglist.cpp. References curIndex, curNode, firstNode, lastNode, QPtrCollection::newItem(), QLNode::next, numNodes, and QLNode::prev. Referenced by QPtrList< QCacheItem >::append(), insertAt(), operator=(), QGList(), and KRandomSequence::randomize(). |
|
|
Returns the current index. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 161 of file qglist.h. References curIndex. Referenced by QPtrList< QCacheItem >::at(). |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Sets the item at position index to the current item. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 166 of file qglist.h. References QLNode::data, and locate(). |
|
|
Returns the first item in the list. Definition at line 182 of file qglist.h. References QLNode::data, and firstNode. Referenced by QPtrList< QCacheItem >::getFirst(). |
|
|
Returns the last item in the list. Definition at line 187 of file qglist.h. References QLNode::data, and lastNode. Referenced by QPtrList< QCacheItem >::getLast(). |
|
|
Removes all items from the list. Implements QPtrCollection. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 688 of file qglist.cpp. References curIndex, curNode, QPtrCollection::deleteItem(), FALSE, firstNode, iterators, lastNode, QLNode::next, QGListIteratorList::notifyClear(), and numNodes. Referenced by QPtrList< QCacheItem >::clear(), operator=(), read(), and ~QGList(). |
|
||||||||||||
|
Documented as QPtrList::compareItems(). Compares item1 with item2. Reimplemented in QStrList, and QStrIList. Definition at line 173 of file qglist.cpp. Referenced by contains(), find(), heapSortPushDown(), inSort(), operator==(), and sort(). |
|
|
Counts the number of times item d occurs in the list. Uses compareItems(). Definition at line 782 of file qglist.cpp. References compareItems(), count(), QLNode::data, firstNode, and QLNode::next. Referenced by QPtrList< QCacheItem >::contains(). |
|
|
Counts the number item d occurs in the list. Definition at line 765 of file qglist.cpp. References count(), QLNode::data, firstNode, and QLNode::next. Referenced by QPtrList< QCacheItem >::containsRef(). |
|
|
Returns the number of items in the list. Implements QPtrCollection. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 144 of file qglist.h. References numNodes. Referenced by contains(), containsRef(), QPtrListIterator< QCacheItem >::count(), QPtrList< QCacheItem >::count(), QPtrListIterator< QCacheItem >::isEmpty(), QPtrList< QCacheItem >::isEmpty(), operator=(), operator==(), KRandomSequence::randomize(), sort(), toVector(), and write(). |
|
|
Returns the current node. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 172 of file qglist.h. References curNode. Referenced by QPtrList< QCacheItem >::currentNode(). |
|
||||||||||||
|
Finds item d in the list using compareItems(). If fromStart is TRUE the search begins at the first node; otherwise it begins at the current node. Definition at line 740 of file qglist.cpp. References compareItems(), curIndex, curNode, QLNode::data, firstNode, and QLNode::next. Referenced by QPtrList< QCacheItem >::find(), QPtrList< QCacheItem >::findNext(), and remove(). |
|
||||||||||||
|
Finds item d in the list. If fromStart is TRUE the search begins at the first node; otherwise it begins at the current node. Definition at line 714 of file qglist.cpp. References curIndex, curNode, QLNode::data, firstNode, and QLNode::next. Referenced by QPtrList< QCacheItem >::findNextRef(), QPtrList< QCacheItem >::findRef(), and removeRef(). |
|
|
Returns the first list item. Sets this to current. Reimplemented in QPtrList< type >, QCList, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 837 of file qglist.cpp. References curIndex, curNode, and firstNode. Referenced by QPtrList< QCacheItem >::first(), removeFirst(), and takeFirst(). |
|
|
Returns the current item. Definition at line 177 of file qglist.h. References curNode, and QLNode::data. Referenced by QPtrList< QCacheItem >::current(). |
|
||||||||||||||||
|
Definition at line 914 of file qglist.cpp. References compareItems(). Referenced by sort(). |
|
||||||||||||
|
Inserts item d at position index in the list. Definition at line 421 of file qglist.cpp. References append(), curNode, FALSE, locate(), QPtrCollection::newItem(), QLNode::next, numNodes, prepend(), QLNode::prev, and TRUE. Referenced by QPtrList< QCacheItem >::insert(), inSort(), QPtrList< QCacheItem >::prepend(), and KRandomSequence::randomize(). |
|
|
Inserts item d at its sorted position in the list. Definition at line 367 of file qglist.cpp. References compareItems(), QLNode::data, firstNode, insertAt(), and QLNode::next. Referenced by QPtrList< QCacheItem >::inSort(). |
|
|
Returns the last list item. Sets this to current. Reimplemented in QPtrList< type >, QCList, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 850 of file qglist.cpp. References curIndex, curNode, lastNode, and numNodes. Referenced by QPtrList< QCacheItem >::last(), removeLast(), and takeLast(). |
|
|
Returns the node at position index. Sets this node to current. Definition at line 320 of file qglist.cpp. References curIndex, curNode, FALSE, firstNode, lastNode, QLNode::next, numNodes, QLNode::prev, and TRUE. Referenced by at(), insertAt(), removeAt(), replaceAt(), and takeAt(). |
|
|
Returns the next list item (after current). Sets this to current. Reimplemented in QPtrList< type >, QCList, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 863 of file qglist.cpp. References curIndex, curNode, QLNode::data, and QLNode::next. Referenced by QPtrList< QCacheItem >::next(). |
|
|
Assigns list to this list. Definition at line 265 of file qglist.cpp. References append(), clear(), count(), curIndex, curNode, QLNode::data, firstNode, and QLNode::next. Referenced by QPtrList< QCacheItem >::operator=(). |
|
|
Compares this list with list. Returns TRUE if the lists contain the same data, otherwise FALSE. Definition at line 288 of file qglist.cpp. References compareItems(), count(), QLNode::data, FALSE, firstNode, QLNode::next, and TRUE. Referenced by QPtrList< QCacheItem >::operator!=(), and QPtrList< QCacheItem >::operator==(). |
|
|
Inserts item d at the start of the list. Definition at line 383 of file qglist.cpp. References curIndex, curNode, firstNode, lastNode, QPtrCollection::newItem(), QLNode::next, numNodes, and QLNode::prev. Referenced by insertAt(). |
|
|
Returns the previous list item (before current). Sets this to current. Reimplemented in QPtrList< type >, QCList, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 881 of file qglist.cpp. References curIndex, curNode, QLNode::data, and QLNode::prev. Referenced by QPtrList< QCacheItem >::prev(). |
|
||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Reads a collection/list item from the stream s and returns a reference to the stream. The default implementation sets item to 0.
Reimplemented in QStrList. Definition at line 189 of file qglist.cpp. |
|
|
Reads a list from the stream s. Definition at line 1017 of file qglist.cpp. References clear(), curIndex, curNode, d, firstNode, lastNode, QLNode::next, numNodes, and QLNode::prev. Referenced by operator>>(). |
|
|
Relinks node n and makes it the first node in the list. Definition at line 450 of file qglist.cpp. References curIndex, curNode, firstNode, lastNode, QLNode::next, numNodes, QLNode::prev, and unlink(). Referenced by QCList::reference(). |
|
|
Removes the item d from the list. Uses compareItems() to find the item. If d is 0, removes the current item. Definition at line 535 of file qglist.cpp. References QLNode::data, QPtrCollection::deleteItem(), FALSE, find(), TRUE, and unlink(). Referenced by QPtrList< QCacheItem >::remove(), removeFirst(), and removeLast(). |
|
|
Removes the item at position index from the list. Definition at line 579 of file qglist.cpp. References QLNode::data, QPtrCollection::deleteItem(), FALSE, locate(), TRUE, and unlink(). Referenced by QPtrList< QCacheItem >::remove(). |
|
|
Removes the first item in the list. Reimplemented in QPtrList< type >, QCList, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 149 of file qglist.h. References first(), and remove(). Referenced by QPtrList< QCacheItem >::removeFirst(). |
|
|
Removes the last item in the list. Reimplemented in QPtrList< type >, QCList, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 155 of file qglist.h. References last(), and remove(). Referenced by QPtrList< QCacheItem >::removeLast(). |
|
|
Removes the node n from the list. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 511 of file qglist.cpp. References curIndex, curNode, QPtrCollection::deleteItem(), FALSE, firstNode, qWarning(), TRUE, and unlink(). Referenced by QPtrList< QCacheItem >::removeNode(). |
|
|
Removes the item d from the list. Definition at line 551 of file qglist.cpp. References QLNode::data, QPtrCollection::deleteItem(), FALSE, findRef(), TRUE, and unlink(). Referenced by QPtrList< QCacheItem >::removeRef(). |
|
||||||||||||
|
Replaces the item at index index with d. Definition at line 595 of file qglist.cpp. References QLNode::data, QPtrCollection::deleteItem(), FALSE, locate(), QPtrCollection::newItem(), and TRUE. Referenced by QPtrList< QCacheItem >::replace(). |
|
|
Sorts the list by the result of the virtual compareItems() function. The Heap-Sort algorithm is used for sorting. It sorts n items with O(n*log n) compares. This is the asymptotic optimal solution of the sorting problem. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 960 of file qglist.cpp. References compareItems(), count(), QLNode::data, firstNode, heapSortPushDown(), i, QLNode::next, and size. Referenced by QPtrList< QCacheItem >::sort(). |
|
|
Takes the current item out of the list. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 635 of file qglist.cpp. References d, QLNode::data, and unlink(). Referenced by QPtrList< QCacheItem >::take(). |
|
|
Takes the item at position index out of the list. Definition at line 647 of file qglist.cpp. References d, QLNode::data, locate(), and unlink(). Referenced by QPtrList< QCacheItem >::take(). |
|
|
Takes the first item out of the list. Definition at line 661 of file qglist.cpp. References d, QLNode::data, first(), and unlink(). Referenced by KRandomSequence::randomize(). |
|
|
Takes the last item out of the list. Definition at line 674 of file qglist.cpp. References d, QLNode::data, last(), and unlink(). |
|
|
Takes the node n out of the list. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 613 of file qglist.cpp. References curIndex, curNode, d, QLNode::data, firstNode, QLNode::next, QLNode::prev, qWarning(), and unlink(). Referenced by QPtrList< QCacheItem >::takeNode(). |
|
|
Converts the list to a vector, vector. Reimplemented in QPtrList< type >, QPtrList< QWidget >, QPtrList< QTextDocument >, QPtrList< QCanvasSprite >, QPtrList< KExhaust >, QPtrList< KBit >, QPtrList< QTextCommand >, QPtrList< QTextTableCell >, QPtrList< KMissile >, QPtrList< QFileInfo >, QPtrList< QGDictIterator >, QPtrList< KPowerup >, QPtrList< ColorRange >, QPtrList< Proc >, QPtrList< Type * >, QPtrList< char >, QPtrList< QTextCustomItem >, and QPtrList< QCacheItem >. Definition at line 900 of file qglist.cpp. References count(), QLNode::data, firstNode, i, and QLNode::next. Referenced by QPtrList< QCacheItem >::toVector(). |
|
|
Unlinks the current list node and returns a pointer to this node. Definition at line 471 of file qglist.cpp. References curIndex, curNode, firstNode, iterators, lastNode, QLNode::next, numNodes, and QLNode::prev. Referenced by relinkNode(), remove(), removeAt(), removeNode(), removeRef(), take(), takeAt(), takeFirst(), takeLast(), and takeNode(). |
|
||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Writes a collection/list item to the stream s and returns a reference to the stream. The default implementation does nothing.
Reimplemented in QStrList. Definition at line 205 of file qglist.cpp. |
|
|
Writes the list to the stream s. Definition at line 1049 of file qglist.cpp. References count(), QLNode::data, firstNode, and QLNode::next. Referenced by operator<<(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 135 of file qglist.h. Referenced by append(), at(), clear(), find(), findRef(), first(), last(), locate(), next(), operator=(), prepend(), prev(), QGList(), read(), relinkNode(), removeNode(), takeNode(), and unlink(). |
|
|
Definition at line 134 of file qglist.h. Referenced by append(), clear(), currentNode(), find(), findRef(), first(), get(), insertAt(), last(), locate(), next(), operator=(), prepend(), prev(), QGList(), read(), relinkNode(), removeNode(), takeNode(), and unlink(). |
|
|
Definition at line 132 of file qglist.h. Referenced by append(), QGListIterator::atFirst(), cfirst(), clear(), contains(), containsRef(), find(), findRef(), first(), inSort(), locate(), operator=(), operator==(), prepend(), QGList(), QGListIterator::QGListIterator(), read(), relinkNode(), removeNode(), sort(), takeNode(), QGListIterator::toFirst(), toVector(), unlink(), and write(). |
|
|
Definition at line 137 of file qglist.h. Referenced by clear(), QGListIterator::operator=(), QGList(), QGListIterator::QGListIterator(), unlink(), ~QGList(), and QGListIterator::~QGListIterator(). |
|
|
Definition at line 133 of file qglist.h. Referenced by append(), QGListIterator::atLast(), clast(), clear(), last(), locate(), prepend(), QGList(), read(), relinkNode(), QGListIterator::toLast(), and unlink(). |
|
|
Definition at line 136 of file qglist.h. Referenced by append(), clear(), count(), insertAt(), last(), locate(), prepend(), QGList(), read(), relinkNode(), and unlink(). |
1.4.2