QHash< Key, T >::const_iterator Class Reference


Detailed Description

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

Definition at line 391 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 const T *  pointer
typedef const T &  reference

Public Member Functions

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

Friends

class  iterator

Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Definition at line 397 of file qhash.h.

typedef qptrdiff difference_type

Definition at line 398 of file qhash.h.

typedef T value_type

Definition at line 399 of file qhash.h.

typedef const T* pointer

Definition at line 400 of file qhash.h.

typedef const T& reference

Definition at line 401 of file qhash.h.


Constructor & Destructor Documentation

const_iterator ( ) [inline]

Definition at line 405 of file qhash.h.

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

Definition at line 406 of file qhash.h.

            : i(reinterpret_cast<QHashData::Node *>(node)) { }
const_iterator ( const iterator o ) [inline]

Definition at line 411 of file qhash.h.

        { i = o.i; }

Member Function Documentation

operator Node * ( ) const [inline]

Definition at line 404 of file qhash.h.

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

Definition at line 415 of file qhash.h.

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

Definition at line 416 of file qhash.h.

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

Definition at line 417 of file qhash.h.

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

Definition at line 418 of file qhash.h.

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

Definition at line 419 of file qhash.h.

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

Definition at line 420 of file qhash.h.

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

Definition at line 422 of file qhash.h.

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

Definition at line 426 of file qhash.h.

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

Definition at line 431 of file qhash.h.

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

Definition at line 435 of file qhash.h.

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

Definition at line 440 of file qhash.h.

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

Definition at line 442 of file qhash.h.

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

Definition at line 443 of file qhash.h.

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

Definition at line 444 of file qhash.h.

{ return *this = *this - j; }

Friends And Related Function Documentation

friend class iterator [friend]

Definition at line 393 of file qhash.h.


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

QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator
QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator QHash< Key, T >::const_iterator