QMap< Key, T >::const_iterator Class Reference


Detailed Description

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

Definition at line 298 of file qmap.h.

#include <qmap.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 QMapData::Node * () const
  const_iterator ()
  const_iterator (QMapData::Node *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 304 of file qmap.h.

typedef qptrdiff difference_type

Definition at line 305 of file qmap.h.

typedef T value_type

Definition at line 306 of file qmap.h.

typedef const T* pointer

Definition at line 307 of file qmap.h.

typedef const T& reference

Definition at line 308 of file qmap.h.


Constructor & Destructor Documentation

const_iterator ( ) [inline]

Definition at line 312 of file qmap.h.

: i(0) { }
const_iterator ( QMapData::Node node ) [inline]

Definition at line 313 of file qmap.h.

: i(node) { }
const_iterator ( const iterator o ) [inline]

Definition at line 317 of file qmap.h.

        { i = o.i; }

Member Function Documentation

operator QMapData::Node * ( ) const [inline]

Definition at line 311 of file qmap.h.

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

Definition at line 321 of file qmap.h.

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

Definition at line 322 of file qmap.h.

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

Definition at line 326 of file qmap.h.

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

Definition at line 327 of file qmap.h.

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

Definition at line 328 of file qmap.h.

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

Definition at line 329 of file qmap.h.

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

Definition at line 331 of file qmap.h.

                                            {
            i = i->forward[0];
            return *this;
        }
const_iterator operator++ ( int  ) [inline]

Definition at line 335 of file qmap.h.

                                              {
            const_iterator r = *this;
            i = i->forward[0];
            return r;
        }
const_iterator& operator-- ( ) [inline]

Definition at line 340 of file qmap.h.

                                            {
            i = i->backward;
            return *this;
        }
const_iterator operator-- ( int  ) [inline]

Definition at line 344 of file qmap.h.

                                              {
            const_iterator r = *this;
            i = i->backward;
            return r;
        }
const_iterator operator+ ( int  j ) const [inline]

Definition at line 349 of file qmap.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 351 of file qmap.h.

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

Definition at line 352 of file qmap.h.

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

Definition at line 353 of file qmap.h.

{ return *this = *this - j; }

Friends And Related Function Documentation

friend class iterator [friend]

Definition at line 300 of file qmap.h.


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

QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator
QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator QMap< Key, T >::const_iterator