HomeHome

ClassesAnnotated - TreeFunctionsHomeStructure

QStrListIterator Class Reference


The QStrListIterator class is an iterator for the QStrList and QStrIList classes. More...

#include <qstrlist.h>

Inherits QListIterator.

List of all member functions.

Public Members


Detailed Description

The QStrListIterator class is an iterator for the QStrList and QStrIList classes.

This class is a QListIterator<char> instance. It can traverse the strings in the QStrList and QStrIList classes.


Member Function Documentation

QStrListIterator::QStrListIterator ( const QList<type> & list )

Constructs an iterator for list. The current iterator item is set to point on the first item in the list.

QStrListIterator::~QStrListIterator ()

Destroys the iterator.

QStrListIterator::operator type * () const

Cast operator. Returns a pointer to the current iterator item. Same as current().

bool QStrListIterator::atFirst () const

Returns TRUE if the current iterator item is the first list item, otherwise FALSE.

See also toFirst() and atLast().

bool QStrListIterator::atLast () const

Returns TRUE if the current iterator item is the last list item, otherwise FALSE.

See also toLast() and atFirst().

uint QStrListIterator::count () const

Returns the number of items in the list this iterator operates on.

See also isEmpty().

type * QStrListIterator::current () const

Returns a pointer to the current iterator item.

bool QStrListIterator::isEmpty () const

Returns TRUE if the list is empty, i.e. count() == 0, otherwise FALSE.

See also count().

type * QStrListIterator::operator* ()

Asterix operator. Returns a pointer to the current iterator item. Same as current().

type * QStrListIterator::operator++ ()

Prefix ++ makes the succeeding item current and returns the new current item.

If the current iterator item was the last item in the list or if it was null, null is returned.

type * QStrListIterator::operator+= ( uint jump )

Sets the current item to the item jump positions after the current item, and returns a pointer to that item.

If that item is beyond the last item or if the dictionary is empty, it sets the current item to null and returns null.

type * QStrListIterator::operator-- ()

Prefix -- makes the preceding item current and returns the new current item.

If the current iterator item was the first item in the list or if it was null, null is returned.

type * QStrListIterator::operator-= ( uint jump )

Returns the item jump positions before the current item, or null if it is beyond the first item. Makes this the current item.

QStrListIterator<type>& QStrListIterator::operator= ( const QStrListIterator<type> & it )

Assignment. Makes a copy of the iterator it and returns a reference to this iterator.

type * QStrListIterator::toFirst ()

Sets the current iterator item to point to the first list item and returns a pointer to the item. Sets the current item to null and returns null if the list is empty.

See also toLast() and atFirst().

type * QStrListIterator::toLast ()

Sets the current iterator item to point to the last list item and returns a pointer to the item. Sets the current item to null and returns null if the list is empty.

See also toFirst() and atLast().


Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):


This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.


Copyright © 2000 TrolltechTrademarks
Qt version 2.2.1