- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Friends

# QMap< Key, T >::iterator Class Reference

Search for all occurrences

## Detailed Description

### template<class Key, class T>
class QMap< Key, T >::iterator

Definition at line 230 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 T * | pointer
typedef T & | reference
## Public Member Functions
| operator QMapData::Node * () const
| iterator ()
| iterator (QMapData::Node *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

Search for all occurrences

Definition at line 236 of file qmap.h.

typedef qptrdiff difference_type

Search for all occurrences

Definition at line 237 of file qmap.h.

typedef T value_type

Search for all occurrences

Definition at line 238 of file qmap.h.

typedef T* pointer

Search for all occurrences

Definition at line 239 of file qmap.h.

typedef T& reference

Search for all occurrences

Definition at line 240 of file qmap.h.

## Constructor & Destructor Documentation

iterator | ( |  | ) | `[inline]`

Definition at line 244 of file qmap.h.

    : i(0) { }

iterator | ( | QMapData::Node * | node | ) | `[inline]`

Definition at line 245 of file qmap.h.

    : i(node) { }

## Member Function Documentation

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

Search for all occurrences

Definition at line 243 of file qmap.h.

    { return i; }

const Key& key | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 247 of file qmap.h.

    { return concrete(i)->key; }

T& value | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 248 of file qmap.h.

    { return concrete(i)->value; }

T& operator* | ( |  | ) | const `[inline]`

Definition at line 252 of file qmap.h.

    { return concrete(i)->value; }

T* operator-> | ( | void |  | ) | const `[inline]`

Definition at line 253 of file qmap.h.

    { return &concrete(i)->value; }

bool operator== | ( | const iterator & | o | ) | const `[inline]`

Definition at line 254 of file qmap.h.

    { return i == o.i; }

bool operator!= | ( | const iterator & | o | ) | const `[inline]`

Definition at line 255 of file qmap.h.

    { return i != o.i; }

iterator& operator++ | ( |  | ) | `[inline]`

Definition at line 257 of file qmap.h.

                                          {
                i = i->forward[0];
                return *this;
            }

iterator operator++ | ( | int |  | ) | `[inline]`

Definition at line 261 of file qmap.h.

                                            {
                iterator r = *this;
                i = i->forward[0];
                return r;
            }

iterator& operator-- | ( |  | ) | `[inline]`

Definition at line 266 of file qmap.h.

                                          {
                i = i->backward;
                return *this;
            }

iterator operator-- | ( | int |  | ) | `[inline]`

Definition at line 270 of file qmap.h.

                                            {
                iterator r = *this;
                i = i->backward;
                return r;
            }

iterator operator+ | ( | int | j | ) | const `[inline]`

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

    { return operator+(-j); }

iterator& operator+= | ( | int | j | ) | `[inline]`

Definition at line 278 of file qmap.h.

    { return *this = *this + j; }

iterator& operator-= | ( | int | j | ) | `[inline]`

Definition at line 279 of file qmap.h.

    { return *this = *this - j; }

bool operator== | ( | const const_iterator & | o | ) | const `[inline]`

Definition at line 287 of file qmap.h.

                { return i == o.i; }

bool operator!= | ( | const const_iterator & | o | ) | const `[inline]`

Definition at line 289 of file qmap.h.

                { return i != o.i; }

## Friends And Related Function Documentation

friend class const_iterator `[friend]`

Search for all occurrences

Definition at line 232 of file qmap.h.

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

- QtCore/qmap.h

QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator
QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator QMap< Key, T >::iterator