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

QGList Class Reference

The QGList class is an internal class for implementing Qt collection classes. More...

#include </home/clem/local/src/opie/qmake/include/qglist.h>

Inheritance diagram for QGList:

Inheritance graph
[legend]
Collaboration diagram for QGList:

Collaboration graph
[legend]
List of all members.

Public Member Functions

uint count () const
QDataStreamread (QDataStream &)
QDataStreamwrite (QDataStream &) const

Protected Member Functions

 QGList ()
 QGList (const QGList &)
virtual ~QGList ()
QGListoperator= (const QGList &)
bool operator== (const QGList &) const
void inSort (QPtrCollection::Item)
void append (QPtrCollection::Item)
bool insertAt (uint index, QPtrCollection::Item)
void relinkNode (QLNode *)
bool removeNode (QLNode *)
bool remove (QPtrCollection::Item=0)
bool removeRef (QPtrCollection::Item=0)
bool removeFirst ()
bool removeLast ()
bool removeAt (uint)
bool replaceAt (uint, QPtrCollection::Item)
QPtrCollection::Item takeNode (QLNode *)
QPtrCollection::Item take ()
QPtrCollection::Item takeAt (uint index)
QPtrCollection::Item takeFirst ()
QPtrCollection::Item takeLast ()
void sort ()
void clear ()
int findRef (QPtrCollection::Item, bool=TRUE)
int find (QPtrCollection::Item, bool=TRUE)
uint containsRef (QPtrCollection::Item) const
uint contains (QPtrCollection::Item) const
QPtrCollection::Item at (uint index)
int at () const
QLNodecurrentNode () const
QPtrCollection::Item get () const
QPtrCollection::Item cfirst () const
QPtrCollection::Item clast () const
QPtrCollection::Item first ()
QPtrCollection::Item last ()
QPtrCollection::Item next ()
QPtrCollection::Item prev ()
void toVector (QGVector *) const
virtual int compareItems (QPtrCollection::Item, QPtrCollection::Item)
virtual QDataStreamread (QDataStream &, QPtrCollection::Item &)
virtual QDataStreamwrite (QDataStream &, QPtrCollection::Item) const

Private Member Functions

void prepend (QPtrCollection::Item)
void heapSortPushDown (QPtrCollection::Item *heap, int first, int last)
QLNodelocate (uint)
QLNodeunlink ()

Private Attributes

QLNodefirstNode
QLNodelastNode
QLNodecurNode
int curIndex
uint numNodes
QGListIteratorListiterators

Friends

class QGListIterator
class QGListIteratorList
class QGVector

Detailed Description

The QGList class is an internal class for implementing Qt collection classes.

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.


Constructor & Destructor Documentation

QGList::QGList  )  [protected]
 

Constructs an empty list.

Definition at line 219 of file qglist.cpp.

References curIndex, curNode, firstNode, iterators, lastNode, and numNodes.

QGList::QGList const QGList list  )  [protected]
 

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.

QGList::~QGList  )  [protected, virtual]
 

Removes all items from the list and destroys the list.

Definition at line 249 of file qglist.cpp.

References clear(), and iterators.


Member Function Documentation

void QGList::append QPtrCollection::Item  d  )  [protected]
 

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().

int QGList::at  )  const [inline, protected]
 

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().

QPtrCollection::Item QGList::at uint  index  )  [inline, protected]
 

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().

QPtrCollection::Item QGList::cfirst  )  const [inline, protected]
 

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().

QPtrCollection::Item QGList::clast  )  const [inline, protected]
 

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().

void QGList::clear  )  [protected, virtual]
 

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().

int QGList::compareItems QPtrCollection::Item  item1,
QPtrCollection::Item  item2
[protected, virtual]
 

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().

uint QGList::contains QPtrCollection::Item  d  )  const [protected]
 

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().

uint QGList::containsRef QPtrCollection::Item  d  )  const [protected]
 

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().

uint QGList::count  )  const [inline, virtual]
 

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().

QLNode * QGList::currentNode  )  const [inline, protected]
 

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().

int QGList::find QPtrCollection::Item  d,
bool  fromStart = TRUE
[protected]
 

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().

int QGList::findRef QPtrCollection::Item  d,
bool  fromStart = TRUE
[protected]
 

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().

QPtrCollection::Item QGList::first  )  [protected]
 

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().

QPtrCollection::Item QGList::get  )  const [inline, protected]
 

Returns the current item.

Definition at line 177 of file qglist.h.

References curNode, and QLNode::data.

Referenced by QPtrList< QCacheItem >::current().

void QGList::heapSortPushDown QPtrCollection::Item heap,
int  first,
int  last
[private]
 

Definition at line 914 of file qglist.cpp.

References compareItems().

Referenced by sort().

bool QGList::insertAt uint  index,
QPtrCollection::Item  d
[protected]
 

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().

void QGList::inSort QPtrCollection::Item  d  )  [protected]
 

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().

QPtrCollection::Item QGList::last  )  [protected]
 

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().

QLNode * QGList::locate uint  index  )  [private]
 

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().

QPtrCollection::Item QGList::next  )  [protected]
 

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().

QGList & QGList::operator= const QGList list  )  [protected]
 

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=().

bool QGList::operator== const QGList list  )  const [protected]
 

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==().

void QGList::prepend QPtrCollection::Item  d  )  [private]
 

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().

QPtrCollection::Item QGList::prev  )  [protected]
 

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().

QDataStream & QGList::read QDataStream s,
QPtrCollection::Item item
[protected, virtual]
 

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.

See also:
write()

Reimplemented in QStrList.

Definition at line 189 of file qglist.cpp.

QDataStream & QGList::read QDataStream s  ) 
 

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>>().

void QGList::relinkNode QLNode n  )  [protected]
 

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().

bool QGList::remove QPtrCollection::Item  d = 0  )  [protected]
 

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().

bool QGList::removeAt uint  index  )  [protected]
 

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().

bool QGList::removeFirst  )  [inline, protected]
 

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().

bool QGList::removeLast  )  [inline, protected]
 

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().

bool QGList::removeNode QLNode n  )  [protected]
 

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().

bool QGList::removeRef QPtrCollection::Item  d = 0  )  [protected]
 

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().

bool QGList::replaceAt uint  index,
QPtrCollection::Item  d
[protected]
 

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().

void QGList::sort  )  [protected]
 

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().

QPtrCollection::Item QGList::take  )  [protected]
 

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().

QPtrCollection::Item QGList::takeAt uint  index  )  [protected]
 

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().

QPtrCollection::Item QGList::takeFirst  )  [protected]
 

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().

QPtrCollection::Item QGList::takeLast  )  [protected]
 

Takes the last item out of the list.

Definition at line 674 of file qglist.cpp.

References d, QLNode::data, last(), and unlink().

QPtrCollection::Item QGList::takeNode QLNode n  )  [protected]
 

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().

void QGList::toVector QGVector vector  )  const [protected]
 

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().

QLNode * QGList::unlink  )  [private]
 

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().

QDataStream & QGList::write QDataStream s,
QPtrCollection::Item 
const [protected, virtual]
 

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.

See also:
read()

Reimplemented in QStrList.

Definition at line 205 of file qglist.cpp.

QDataStream & QGList::write QDataStream s  )  const
 

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<<().


Friends And Related Function Documentation

friend class QGListIterator [friend]
 

Definition at line 62 of file qglist.h.

friend class QGListIteratorList [friend]
 

Definition at line 63 of file qglist.h.

friend class QGVector [friend]
 

Definition at line 64 of file qglist.h.


Member Data Documentation

int QGList::curIndex [private]
 

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().

QLNode* QGList::curNode [private]
 

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().

QLNode* QGList::firstNode [private]
 

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().

QGListIteratorList* QGList::iterators [private]
 

Definition at line 137 of file qglist.h.

Referenced by clear(), QGListIterator::operator=(), QGList(), QGListIterator::QGListIterator(), unlink(), ~QGList(), and QGListIterator::~QGListIterator().

QLNode* QGList::lastNode [private]
 

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().

uint QGList::numNodes [private]
 

Definition at line 136 of file qglist.h.

Referenced by append(), clear(), count(), insertAt(), last(), locate(), prepend(), QGList(), read(), relinkNode(), and unlink().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:47:16 2005 for OPIE by  doxygen 1.4.2