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

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes

# QLinkedList< T >::iterator Class Reference

Search for all occurrences

## Detailed Description

### template<class T>
class QLinkedList< T >::iterator

Definition at line 113 of file qlinkedlist.h.

`#include <qlinkedlist.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
| iterator ()
| iterator (Node *n)
| iterator (const iterator &o)
iterator & | operator= (const iterator &o)
T & | operator* () const
T * | operator-> () const
bool | operator== (const iterator &o) const
bool | operator!= (const iterator &o) const
bool | operator== (const const_iterator &o) const
bool | operator!= (const 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)
## Public Attributes
Node * | i

## Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Search for all occurrences

Definition at line 116 of file qlinkedlist.h.

typedef qptrdiff difference_type

Search for all occurrences

Definition at line 117 of file qlinkedlist.h.

typedef T value_type

Search for all occurrences

Definition at line 118 of file qlinkedlist.h.

typedef T* pointer

Search for all occurrences

Definition at line 119 of file qlinkedlist.h.

typedef T& reference

Search for all occurrences

Definition at line 120 of file qlinkedlist.h.

## Constructor & Destructor Documentation

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

Definition at line 122 of file qlinkedlist.h.

    : i(0) {}

iterator | ( | Node * | n | ) | `[inline]`

Definition at line 123 of file qlinkedlist.h.

    : i(n) {}

iterator | ( | const iterator & | o | ) | `[inline]`

Definition at line 124 of file qlinkedlist.h.

    : i(o.i) {}

## Member Function Documentation

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

Definition at line 125 of file qlinkedlist.h.

    { i = o.i; return *this; }

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

Definition at line 126 of file qlinkedlist.h.

    { return i->t; }

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

Definition at line 127 of file qlinkedlist.h.

    { return &i->t; }

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

Definition at line 128 of file qlinkedlist.h.

    { return i == o.i; }

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

Definition at line 129 of file qlinkedlist.h.

    { return i != o.i; }

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

Definition at line 130 of file qlinkedlist.h.

                { return i == o.i; }

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

Definition at line 132 of file qlinkedlist.h.

                { return i != o.i; }

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

Definition at line 134 of file qlinkedlist.h.

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

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

Definition at line 135 of file qlinkedlist.h.

    { Node *n = i; i = i->n; return n; }

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

Definition at line 136 of file qlinkedlist.h.

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

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

Definition at line 137 of file qlinkedlist.h.

    { Node *n = i; i = i->p; return n; }

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

Definition at line 138 of file qlinkedlist.h.

            { Node *n = i; if (j > 0) while (j--) n = n->n; else while (j++) n = n->p; return n; }

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

Definition at line 140 of file qlinkedlist.h.

    { return operator+(-j); }

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

Definition at line 141 of file qlinkedlist.h.

    { return *this = *this + j; }

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

Definition at line 142 of file qlinkedlist.h.

    { return *this = *this - j; }

## Member Data Documentation

Node* i

Search for all occurrences

Definition at line 121 of file qlinkedlist.h.

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

- QtCore/qlinkedlist.h

QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator
QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator QLinkedList< T >::iterator