Blame qtools/qdict.doc

Packit Service 50c9f2
/****************************************************************************
Packit Service 50c9f2
** 
Packit Service 50c9f2
**
Packit Service 50c9f2
** QDict and QDictIterator class documentation
Packit Service 50c9f2
**
Packit Service 50c9f2
** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
Packit Service 50c9f2
**
Packit Service 50c9f2
** This file is part of the Qt GUI Toolkit.
Packit Service 50c9f2
**
Packit Service 50c9f2
** This file may be distributed under the terms of the Q Public License
Packit Service 50c9f2
** as defined by Trolltech AS of Norway and appearing in the file
Packit Service 50c9f2
** LICENSE.QPL included in the packaging of this file.
Packit Service 50c9f2
**
Packit Service 50c9f2
** This file may be distributed and/or modified under the terms of the
Packit Service 50c9f2
** GNU General Public License version 2 as published by the Free Software
Packit Service 50c9f2
** Foundation and appearing in the file LICENSE.GPL included in the
Packit Service 50c9f2
** packaging of this file.
Packit Service 50c9f2
**
Packit Service 50c9f2
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
Packit Service 50c9f2
** licenses may use this file in accordance with the Qt Commercial License
Packit Service 50c9f2
** Agreement provided with the Software.
Packit Service 50c9f2
**
Packit Service 50c9f2
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
Packit Service 50c9f2
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Packit Service 50c9f2
**
Packit Service 50c9f2
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
Packit Service 50c9f2
**   information about Qt Commercial License Agreements.
Packit Service 50c9f2
** See http://www.trolltech.com/qpl/ for QPL licensing information.
Packit Service 50c9f2
** See http://www.trolltech.com/gpl/ for GPL licensing information.
Packit Service 50c9f2
**
Packit Service 50c9f2
** Contact info@trolltech.com if any conditions of this licensing are
Packit Service 50c9f2
** not clear to you.
Packit Service 50c9f2
**
Packit Service 50c9f2
**********************************************************************/
Packit Service 50c9f2
Packit Service 50c9f2
Packit Service 50c9f2
/*****************************************************************************
Packit Service 50c9f2
  QDict documentation
Packit Service 50c9f2
 *****************************************************************************/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \class QDict qdict.h
Packit Service 50c9f2
  \brief The QDict class is a template class that provides a dictionary based on \c QString keys.
Packit Service 50c9f2
Packit Service 50c9f2
  \ingroup collection
Packit Service 50c9f2
  \ingroup tools
Packit Service 50c9f2
Packit Service 50c9f2
  QDict is implemented as a template class. Define a template instance
Packit Service 50c9f2
  QDict\<X\> to create a dictionary that operates on pointers to X, or X*.
Packit Service 50c9f2
Packit Service 50c9f2
  A dictionary is a collection that associates an item with a key.
Packit Service 50c9f2
  The key is used for inserting and looking up an item. QDict has
Packit Service 50c9f2
  \l QString keys, which are Unicode strings.  If you want to use
Packit Service 50c9f2
  non-Unicode, plain 8-bit \c char* keys, use the QAsciiDict template.
Packit Service 50c9f2
  A QDict has the same performance as a QAsciiDict.
Packit Service 50c9f2
Packit Service 50c9f2
  The dictionary has very fast insertion and lookup.
Packit Service 50c9f2
Packit Service 50c9f2
  Example:
Packit Service 50c9f2
  \code
Packit Service 50c9f2
    #include <qdict.h>
Packit Service 50c9f2
    #include <stdio.h>
Packit Service 50c9f2
Packit Service 50c9f2
    void main()
Packit Service 50c9f2
    {
Packit Service 50c9f2
      // Creates a dictionary that maps QString ==> char* (case insensitive)
Packit Service 50c9f2
	QDict<char> dict( 17, FALSE );
Packit Service 50c9f2
Packit Service 50c9f2
	dict.insert( "France", "Paris" );
Packit Service 50c9f2
	dict.insert( "Russia", "Moscow" );
Packit Service 50c9f2
	dict.insert( "Norway", "Oslo" );
Packit Service 50c9f2
Packit Service 50c9f2
	printf( "%s\n", dict["Norway"] );
Packit Service 50c9f2
	printf( "%s\n", dict["FRANCE"] );
Packit Service 50c9f2
	printf( "%s\n", dict["russia"] );
Packit Service 50c9f2
Packit Service 50c9f2
	if ( !dict["Italy"] )
Packit Service 50c9f2
	    printf( "Italy not defined\n" );
Packit Service 50c9f2
    }
Packit Service 50c9f2
  \endcode
Packit Service 50c9f2
Packit Service 50c9f2
  Program output:
Packit Service 50c9f2
  \code
Packit Service 50c9f2
	Oslo
Packit Service 50c9f2
	Paris
Packit Service 50c9f2
	Moscow
Packit Service 50c9f2
	Italy not defined
Packit Service 50c9f2
  \endcode
Packit Service 50c9f2
Packit Service 50c9f2
  The dictionary in our example maps \c QString keys to \c char* items.
Packit Service 50c9f2
  Note that the mapping is case insensitive (specified in the
Packit Service 50c9f2
  \link QDict::QDict() constructor\endlink).
Packit Service 50c9f2
  QDict implements the \link operator[] [] operator\endlink to lookup an item.
Packit Service 50c9f2
Packit Service 50c9f2
  QDict is implemented by QGDict as a hash array with a fixed number of
Packit Service 50c9f2
  entries. Each array entry points to a singly linked list of buckets, in
Packit Service 50c9f2
  which the dictionary items are stored.
Packit Service 50c9f2
Packit Service 50c9f2
  When an item is inserted with a key, the key is converted (hashed) to
Packit Service 50c9f2
  an integer index into the hash array. The item is inserted before the
Packit Service 50c9f2
  first bucket in the list of buckets.
Packit Service 50c9f2
Packit Service 50c9f2
  Looking up an item is normally very fast. The key is again hashed to an
Packit Service 50c9f2
  array index. Then QDict scans the list of buckets and returns the item
Packit Service 50c9f2
  found or null if the item was not found.  You cannot insert null pointers
Packit Service 50c9f2
  into a dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  The size of the hash array is very important. In order to get good
Packit Service 50c9f2
  performance, you should use a suitably large \link primes.html prime
Packit Service 50c9f2
  number\endlink.  Suitable means equal to or larger than the maximum
Packit Service 50c9f2
  expected number of dictionary items.
Packit Service 50c9f2
Packit Service 50c9f2
  Items with equal keys are allowed.  When inserting two items with the
Packit Service 50c9f2
  same key, only the last inserted item will be visible (last in, first out)
Packit Service 50c9f2
  until it is removed.
Packit Service 50c9f2
Packit Service 50c9f2
  Example:
Packit Service 50c9f2
  \code
Packit Service 50c9f2
    #include <qdict.h>
Packit Service 50c9f2
    #include <stdio.h>
Packit Service 50c9f2
Packit Service 50c9f2
    void main()
Packit Service 50c9f2
    {
Packit Service 50c9f2
      // Creates a dictionary that maps QString ==> char* (case sensitive)
Packit Service 50c9f2
	QDict<char> dict;
Packit Service 50c9f2
Packit Service 50c9f2
	dict.insert( "Germany", "Berlin" );
Packit Service 50c9f2
	dict.insert( "Germany", "Bonn" );
Packit Service 50c9f2
Packit Service 50c9f2
	printf( "%s\n", dict["Germany"] );
Packit Service 50c9f2
	dict.remove( "Germany" );	// Oct 3rd 1990
Packit Service 50c9f2
	printf( "%s\n", dict["Germany"] );
Packit Service 50c9f2
    }
Packit Service 50c9f2
  \endcode
Packit Service 50c9f2
Packit Service 50c9f2
  Program output:
Packit Service 50c9f2
  \code
Packit Service 50c9f2
	Bonn
Packit Service 50c9f2
	Berlin
Packit Service 50c9f2
  \endcode
Packit Service 50c9f2
Packit Service 50c9f2
  The QDictIterator class can traverse the dictionary contents, but only
Packit Service 50c9f2
  in an arbitrary order.  Multiple iterators may independently traverse the
Packit Service 50c9f2
  same dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  Calling setAutoDelete(TRUE) for a dictionary tells it to delete items
Packit Service 50c9f2
  that are removed .  The default is to not delete items when they are
Packit Service 50c9f2
  removed.
Packit Service 50c9f2
Packit Service 50c9f2
  When inserting an item into a dictionary, only the pointer is copied, not
Packit Service 50c9f2
  the item itself. This is called a shallow copy. It is possible to make the
Packit Service 50c9f2
  dictionary copy all of the item's data (known as a deep copy) when an
Packit Service 50c9f2
  item is inserted.  insert() calls the virtual function
Packit Service 50c9f2
  QCollection::newItem() for the item to be inserted.
Packit Service 50c9f2
  Inherit a dictionary and reimplement it if you want deep copies.
Packit Service 50c9f2
Packit Service 50c9f2
  When removing a dictionary item, the virtual function
Packit Service 50c9f2
  QCollection::deleteItem() is called.  QDict's default implementation
Packit Service 50c9f2
  is to delete the item if auto-deletion is enabled.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa QDictIterator, QAsciiDict, QIntDict, QPtrDict,
Packit Service 50c9f2
      \link collection.html Collection Classes\endlink
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QDict::QDict( int size, bool caseSensitive )
Packit Service 50c9f2
  Constructs a dictionary with the following properties:
Packit Service 50c9f2
  \arg \e size is the size of the internal hash array.
Packit Service 50c9f2
  \arg \e caseSensitive specifies whether to use case sensitive lookup or not.
Packit Service 50c9f2
Packit Service 50c9f2
  Setting \e size to a suitably large \link primes.html prime
Packit Service 50c9f2
  number\endlink (equal to or greater than the expected number of entries)
Packit Service 50c9f2
  makes the hash distribution better and hence the loopup faster.
Packit Service 50c9f2
Packit Service 50c9f2
  Setting \e caseSensitive to TRUE will treat "abc" and "Abc" as different
Packit Service 50c9f2
  keys.  Setting it to FALSE will make the dictionary ignore case.
Packit Service 50c9f2
  Case insensitive comparison includes the whole Unicode alphabeth.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QDict::QDict( const QDict<type> &dict )
Packit Service 50c9f2
  Constructs a copy of \e dict.
Packit Service 50c9f2
Packit Service 50c9f2
  Each item in \e dict are inserted into this dictionary.
Packit Service 50c9f2
  Only the pointers are copied (shallow copy).
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QDict::~QDict()
Packit Service 50c9f2
  Removes all items from the dictionary and destroys it.
Packit Service 50c9f2
  All iterators that access this dictionary will be reset.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa setAutoDelete()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QDict<type> &QDict::operator=(const QDict<type> &dict)
Packit Service 50c9f2
  Assigns \e dict to this dictionary and returns a reference to this
Packit Service 50c9f2
  dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  This dictionary is first cleared, then each item in \e dict is inserted
Packit Service 50c9f2
  into this dictionary.
Packit Service 50c9f2
  Only the pointers are copied (shallow copy), unless newItem() has been
Packit Service 50c9f2
  reimplemented().
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn uint QDict::count() const
Packit Service 50c9f2
  Returns the number of items in the dictionary.
Packit Service 50c9f2
  \sa isEmpty()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn uint QDict::size() const
Packit Service 50c9f2
  Returns the size of the internal hash array (as specified in the
Packit Service 50c9f2
  constructor).
Packit Service 50c9f2
  \sa count()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn void QDict::resize( uint newsize )
Packit Service 50c9f2
  Changes the size of the hashtable the \a newsize.
Packit Service 50c9f2
  The contents of the dictionary are preserved,
Packit Service 50c9f2
  but all iterators on the dictionary become invalid.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn bool QDict::isEmpty() const
Packit Service 50c9f2
  Returns TRUE if the dictionary is empty, i.e. count() == 0. Returns FALSE
Packit Service 50c9f2
  otherwise.
Packit Service 50c9f2
  \sa count()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn void QDict::insert( const QString &key, const type *item )
Packit Service 50c9f2
Packit Service 50c9f2
  Inserts the \e key with the \e item into the dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  The key does not have to be a unique dictionary key.  If multiple items
Packit Service 50c9f2
  are inserted with the same key, only the last item will be visible.
Packit Service 50c9f2
Packit Service 50c9f2
  Null items are not allowed.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa replace()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn void QDict::replace( const QString &key, const type *item )
Packit Service 50c9f2
Packit Service 50c9f2
  Replaces an item which has a key equal to \e key with \e item.
Packit Service 50c9f2
Packit Service 50c9f2
  If the item does not already exist, it will be inserted.
Packit Service 50c9f2
Packit Service 50c9f2
  Null items are not allowed.
Packit Service 50c9f2
Packit Service 50c9f2
  Equivalent to:
Packit Service 50c9f2
  \code
Packit Service 50c9f2
    QDict<char> dict;
Packit Service 50c9f2
	...
Packit Service 50c9f2
    if ( dict.find(key) )
Packit Service 50c9f2
	dict.remove( key );
Packit Service 50c9f2
    dict.insert( key, item );
Packit Service 50c9f2
  \endcode
Packit Service 50c9f2
Packit Service 50c9f2
  If there are two or more items with equal keys, then the last inserted
Packit Service 50c9f2
  of these will be replaced.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa insert()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn bool QDict::remove( const QString &key )
Packit Service 50c9f2
Packit Service 50c9f2
  Removes the item associated with \e key from the dictionary.
Packit Service 50c9f2
  Returns TRUE if successful, or FALSE if the key does not exist in the
Packit Service 50c9f2
  dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  If there are two or more items with equal keys, then the last inserted
Packit Service 50c9f2
  of these will be removed.
Packit Service 50c9f2
Packit Service 50c9f2
  The removed item is deleted if \link QCollection::setAutoDelete()
Packit Service 50c9f2
  auto-deletion\endlink is enabled.
Packit Service 50c9f2
Packit Service 50c9f2
  All dictionary iterators that refer to the removed item will be set to
Packit Service 50c9f2
  point to the next item in the dictionary traversing order.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa take(), clear(), setAutoDelete()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDict::take( const QString &key )
Packit Service 50c9f2
Packit Service 50c9f2
  Takes the item associated with \e key out of the dictionary without
Packit Service 50c9f2
  deleting it (even if \link QCollection::setAutoDelete()
Packit Service 50c9f2
  auto-deletion\endlink is enabled).
Packit Service 50c9f2
Packit Service 50c9f2
  If there are two or more items with equal keys, then the last inserted
Packit Service 50c9f2
  of these will be taken.
Packit Service 50c9f2
Packit Service 50c9f2
  Returns a pointer to the item taken out, or null if the key does not
Packit Service 50c9f2
  exist in the dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  All dictionary iterators that refer to the taken item will be set to
Packit Service 50c9f2
  point to the next item in the dictionary traversal order.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa remove(), clear(), setAutoDelete()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn void QDict::clear()
Packit Service 50c9f2
Packit Service 50c9f2
  Removes all items from the dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  The removed items are deleted if \link QCollection::setAutoDelete()
Packit Service 50c9f2
  auto-deletion\endlink is enabled.
Packit Service 50c9f2
Packit Service 50c9f2
  All dictionary iterators that operate on dictionary are reset.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa remove(), take(), setAutoDelete()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDict::find( const QString &key ) const
Packit Service 50c9f2
Packit Service 50c9f2
  Returns the item associated with \e key, or null if the key does not
Packit Service 50c9f2
  exist in the dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  This function uses an internal hashing algorithm to optimize lookup.
Packit Service 50c9f2
Packit Service 50c9f2
  If there are two or more items with equal keys, then the last inserted
Packit Service 50c9f2
  of these will be found.
Packit Service 50c9f2
Packit Service 50c9f2
  Equivalent to the [] operator.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa operator[]()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDict::operator[]( const QString &key ) const
Packit Service 50c9f2
Packit Service 50c9f2
  Returns the item associated with \e key, or null if the key does not
Packit Service 50c9f2
  exist in the dictionary.
Packit Service 50c9f2
Packit Service 50c9f2
  This function uses an internal hashing algorithm to optimize lookup.
Packit Service 50c9f2
Packit Service 50c9f2
  If there are two or more items with equal keys, then the last inserted
Packit Service 50c9f2
  of these will be found.
Packit Service 50c9f2
Packit Service 50c9f2
  Equivalent to the find() function.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa find()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn void QDict::statistics() const
Packit Service 50c9f2
  Debugging-only function that prints out the dictionary distribution
Packit Service 50c9f2
  using qDebug().
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
Packit Service 50c9f2
/*****************************************************************************
Packit Service 50c9f2
  QDictIterator documentation
Packit Service 50c9f2
 *****************************************************************************/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \class QDictIterator qdict.h
Packit Service 50c9f2
  \brief The QDictIterator class provides an iterator for QDict collections.
Packit Service 50c9f2
Packit Service 50c9f2
  \ingroup collection
Packit Service 50c9f2
  \ingroup tools
Packit Service 50c9f2
Packit Service 50c9f2
  QDictIterator is implemented as a template class.
Packit Service 50c9f2
  Define a template instance QDictIterator\<X\> to create a
Packit Service 50c9f2
  dictionary iterator that operates on QDict\<X\> (dictionary of X*).
Packit Service 50c9f2
Packit Service 50c9f2
  Example:
Packit Service 50c9f2
  \code
Packit Service 50c9f2
    #include <qdict.h>
Packit Service 50c9f2
    #include <stdio.h>
Packit Service 50c9f2
Packit Service 50c9f2
    void main()
Packit Service 50c9f2
    {
Packit Service 50c9f2
      // Creates a dictionary that maps QString ==> char* (case insensitive)
Packit Service 50c9f2
	QDict<char> dict( 17, FALSE );
Packit Service 50c9f2
Packit Service 50c9f2
	dict.insert( "France", "Paris" );
Packit Service 50c9f2
	dict.insert( "Russia", "Moscow" );
Packit Service 50c9f2
	dict.insert( "Norway", "Oslo" );
Packit Service 50c9f2
Packit Service 50c9f2
	QDictIterator<char> it( dict ); // iterator for dict
Packit Service 50c9f2
Packit Service 50c9f2
        while ( it.current() ) {
Packit Service 50c9f2
	    printf( "%s -> %s\n", it.currentKey().latin1(), it.current() );
Packit Service 50c9f2
	    ++it;
Packit Service 50c9f2
	}
Packit Service 50c9f2
    }
Packit Service 50c9f2
  \endcode
Packit Service 50c9f2
Packit Service 50c9f2
  Program output:
Packit Service 50c9f2
  \code
Packit Service 50c9f2
	Russia -> Moscow
Packit Service 50c9f2
	Norway -> Oslo
Packit Service 50c9f2
	France -> Paris
Packit Service 50c9f2
  \endcode
Packit Service 50c9f2
Packit Service 50c9f2
  Note that the traversal order is arbitrary, you are not guaranteed the
Packit Service 50c9f2
  order above.
Packit Service 50c9f2
Packit Service 50c9f2
  Multiple iterators may independently traverse the same dictionary.
Packit Service 50c9f2
  A QDict knows about all iterators that are operating on the dictionary.
Packit Service 50c9f2
  When an item is removed from the dictionary, QDict update all iterators
Packit Service 50c9f2
  that are referring the removed item to point to the next item in the
Packit Service 50c9f2
  traversing order.
Packit Service 50c9f2
Packit Service 50c9f2
  \sa QDict, \link collection.html Collection Classes\endlink
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QDictIterator::QDictIterator( const QDict<type> &dict )
Packit Service 50c9f2
  Constructs an iterator for \e dict.  The current iterator item is
Packit Service 50c9f2
  set to point on the first item in the \e dict.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QDictIterator::~QDictIterator()
Packit Service 50c9f2
  Destroys the iterator.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn uint QDictIterator::count() const
Packit Service 50c9f2
  Returns the number of items in the dictionary this iterator operates on.
Packit Service 50c9f2
  \sa isEmpty()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn bool QDictIterator::isEmpty() const
Packit Service 50c9f2
  Returns TRUE if the dictionary is empty, i.e. count() == 0, otherwise FALSE.
Packit Service 50c9f2
  \sa count()
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDictIterator::toFirst()
Packit Service 50c9f2
  Sets the current iterator item to point to the first item in the
Packit Service 50c9f2
  dictionary and returns a pointer to the item.
Packit Service 50c9f2
  If the dictionary is  empty it sets the current item to null and 
Packit Service 50c9f2
  returns null.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QDictIterator::operator type *() const
Packit Service 50c9f2
  Cast operator. Returns a pointer to the current iterator item.
Packit Service 50c9f2
  Same as current().
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDictIterator::current() const
Packit Service 50c9f2
  Returns a pointer to the current iterator item.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn QString QDictIterator::currentKey() const
Packit Service 50c9f2
  Returns a pointer to the key for the current iterator item.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDictIterator::operator()()
Packit Service 50c9f2
  Makes the succeeding item current and returns the original current item.
Packit Service 50c9f2
Packit Service 50c9f2
  If the current iterator item was the last item in the dictionary or if it
Packit Service 50c9f2
  was null, null is returned.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDictIterator::operator++()
Packit Service 50c9f2
  Prefix ++ makes the succeeding item current and returns the new current
Packit Service 50c9f2
  item.
Packit Service 50c9f2
Packit Service 50c9f2
  If the current iterator item was the last item in the dictionary or if it
Packit Service 50c9f2
  was null, null is returned.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2
/*!
Packit Service 50c9f2
  \fn type *QDictIterator::operator+=( uint jump )
Packit Service 50c9f2
  Sets the current item to the item \e jump positions after the current item,
Packit Service 50c9f2
  and returns a pointer to that item.
Packit Service 50c9f2
Packit Service 50c9f2
  If that item is beyond the last item or if the dictionary is  empty,
Packit Service 50c9f2
  it sets the current item to null and  returns null.
Packit Service 50c9f2
*/
Packit Service 50c9f2
Packit Service 50c9f2