QHash< Key, T >::iterator Class Reference


Detailed Description

template<class Key, class T>
class QHash< Key, T >::iterator

Definition at line 326 of file qhash.h.

#include <qhash.h>

List of all members.

Public Types

typedef
std::bidirectional_iterator_tag 
iterator_category
typedef qptrdiff  difference_type
typedef T  value_type
typedef T *  pointer
typedef T &  reference

Public Member Functions

  operator Node * () const
  iterator ()
  iterator (void *node)
const Key &  key () const
T &  value () const
T &  operator* () const
T *  operator-> () const
bool  operator== (const iterator &o) const
bool  operator!= (const iterator &o) const
iterator operator++ ()
iterator  operator++ (int)
iterator operator-- ()
iterator  operator-- (int)
iterator  operator+ (int j) const
iterator  operator- (int j) const
iterator operator+= (int j)
iterator operator-= (int j)
bool  operator== (const const_iterator &o) const
bool  operator!= (const const_iterator &o) const

Friends

class  const_iterator

Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 332 of file qhash.h.

typedef qptrdiff difference_type

Definition at line 333 of file qhash.h.

typedef T value_type

Definition at line 334 of file qhash.h.

typedef T* pointer

Definition at line 335 of file qhash.h.

typedef T& reference

Definition at line 336 of file qhash.h.


Constructor & Destructor Documentation

iterator ( ) [inline]

Definition at line 340 of file qhash.h.

: i(0) { }
iterator ( void *  node ) [inline, explicit]

Definition at line 341 of file qhash.h.

: i(reinterpret_cast<QHashData::Node *>(node)) { }

Member Function Documentation

operator Node * ( ) const [inline]

Definition at line 339 of file qhash.h.

{ return concrete(i); }
const Key& key ( ) const [inline]

Definition at line 343 of file qhash.h.

{ return concrete(i)->key; }
T& value ( ) const [inline]

Definition at line 344 of file qhash.h.

{ return concrete(i)->value; }
T& operator* ( ) const [inline]

Definition at line 345 of file qhash.h.

{ return concrete(i)->value; }
T* operator-> ( void  ) const [inline]

Definition at line 346 of file qhash.h.

{ return &concrete(i)->value; }
bool operator== ( const iterator o ) const [inline]

Definition at line 347 of file qhash.h.

{ return i == o.i; }
bool operator!= ( const iterator o ) const [inline]

Definition at line 348 of file qhash.h.

{ return i != o.i; }
iterator& operator++ ( ) [inline]

Definition at line 350 of file qhash.h.

                                      {
            i = QHashData::nextNode(i);
            return *this;
        }
iterator operator++ ( int  ) [inline]

Definition at line 354 of file qhash.h.

                                        {
            iterator r = *this;
            i = QHashData::nextNode(i);
            return r;
        }
iterator& operator-- ( ) [inline]

Definition at line 359 of file qhash.h.

                                      {
            i = QHashData::previousNode(i);
            return *this;
        }
iterator operator-- ( int  ) [inline]

Definition at line 363 of file qhash.h.

                                        {
            iterator r = *this;
            i = QHashData::previousNode(i);
            return r;
        }
iterator operator+ ( int  j ) const [inline]

Definition at line 368 of file qhash.h.

        { iterator r = *this; if (j > 0) while (j--) ++r; else while (j++) --r; return r; }
iterator operator- ( int  j ) const [inline]

Definition at line 370 of file qhash.h.

{ return operator+(-j); }
iterator& operator+= ( int  j ) [inline]

Definition at line 371 of file qhash.h.

{ return *this = *this + j; }
iterator& operator-= ( int  j ) [inline]

Definition at line 372 of file qhash.h.

{ return *this = *this - j; }
bool operator== ( const const_iterator o ) const [inline]

Definition at line 380 of file qhash.h.

            { return i == o.i; }
bool operator!= ( const const_iterator o ) const [inline]

Definition at line 382 of file qhash.h.

            { return i != o.i; }

Friends And Related Function Documentation

friend class const_iterator [friend]

Definition at line 328 of file qhash.h.


The documentation for this class was generated from the following file:

QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator
QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator QHash< Key, T >::iterator