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

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions

# QFuture< T >::const_iterator Class Reference

Search for all occurrences

## Detailed Description

### template<typename T>
class QFuture< T >::const_iterator

Definition at line 110 of file qfuture.h.

`#include <qfuture.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
| const_iterator ()
| const_iterator (QFuture const *const _future, int _index)
| const_iterator (const const_iterator &o)
const_iterator & | operator= (const const_iterator &o)
const T & | operator* () const
const T * | operator-> () const
bool | operator!= (const const_iterator &other) 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)

## Member Typedef Documentation

typedef std::bidirectional_iterator_tag iterator_category

Search for all occurrences

Definition at line 113 of file qfuture.h.

typedef qptrdiff difference_type

Search for all occurrences

Definition at line 114 of file qfuture.h.

typedef T value_type

Search for all occurrences

Definition at line 115 of file qfuture.h.

typedef const T* pointer

Search for all occurrences

Definition at line 116 of file qfuture.h.

typedef const T& reference

Search for all occurrences

Definition at line 117 of file qfuture.h.

## Constructor & Destructor Documentation

const_iterator | ( |  | ) | `[inline]`

Definition at line 119 of file qfuture.h.

    {}

const_iterator | ( | QFuture const *const | _future,
|  | int | _index
| ) |  | `[inline]`

Definition at line 120 of file qfuture.h.

    : future(_future), index(_index) {}

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

Definition at line 121 of file qfuture.h.

    : future(o.future), index(o.index)  {}

## Member Function Documentation

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

Definition at line 122 of file qfuture.h.

            { future = o.future; index = o.index; return *this; }

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

Definition at line 124 of file qfuture.h.

    { return future->d.resultReference(index); }

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

Definition at line 125 of file qfuture.h.

    { return future->d.resultPointer(index); }

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

Definition at line 127 of file qfuture.h.

            {
                if (index == -1 && other.index == -1) // comparing end != end?
                    return false;
                if (other.index == -1)
                    return (future->isRunning() || (index < future->resultCount()));
                return (index != other.index);
            }

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

Definition at line 136 of file qfuture.h.

    { return !operator!=(o); }

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

Definition at line 137 of file qfuture.h.

    { ++index; return *this; }

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

Definition at line 138 of file qfuture.h.

    { const_iterator r = *this; ++index; return r; }

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

Definition at line 139 of file qfuture.h.

    { --index; return *this; }

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

Definition at line 140 of file qfuture.h.

    { const_iterator r = *this; --index; return r; }

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

Definition at line 141 of file qfuture.h.

    { return const_iterator(future, index + j); }

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

Definition at line 142 of file qfuture.h.

    { return const_iterator(future, index - j); }

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

Definition at line 143 of file qfuture.h.

    { index += j; return *this; }

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

Definition at line 144 of file qfuture.h.

    { index -= j; return *this; }

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

- QtCore/qfuture.h

QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator
QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator QFuture< T >::const_iterator