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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# ResultStore< T > Class Template Reference

Search for all occurrences

## Detailed Description

### template<typename T>
class QtConcurrent::ResultStore< T >

Definition at line 157 of file qtconcurrentresultstore.h.

`#include <qtconcurrentresultstore.h>`

Inheritance diagram for ResultStore< T >:
[legend]

List of all members.

## Public Member Functions
| ResultStore ()
| ResultStore (const ResultStoreBase &base)
int | addResult (int index, const T *result)
int | addResults (int index, const QVector< T > *results)
int | addResults (int index, const QVector< T > *results, int totalCount)
int | addCanceledResult (int index)
int | addCanceledResults (int index, int _count)
ResultIterator< T > | begin () const
ResultIterator< T > | end () const
ResultIterator< T > | resultAt (int index) const
void | clear ()
| ~ResultStore ()

## Constructor & Destructor Documentation

ResultStore | ( |  | ) | `[inline]`

Definition at line 160 of file qtconcurrentresultstore.h.

    { }

ResultStore | ( | const ResultStoreBase & | base | ) | `[inline]`

Definition at line 162 of file qtconcurrentresultstore.h.

        : ResultStoreBase(base) { }

~ResultStore | ( |  | ) | `[inline]`

Definition at line 223 of file qtconcurrentresultstore.h.

        {
            clear();
        }

## Member Function Documentation

int addResult | ( | int | index,
|  | const T * | result
| ) |  | `[inline]`

Search for all occurrences

Definition at line 165 of file qtconcurrentresultstore.h.

        {
            if (result == 0)
                return ResultStoreBase::addResult(index, result);
            else
                return ResultStoreBase::addResult(index, new T(*result));
        }

int addResults | ( | int | index,
|  | const QVector< T > * | results
| ) |  | `[inline]`

Search for all occurrences

Definition at line 173 of file qtconcurrentresultstore.h.

        {
            return ResultStoreBase::addResults(index, new QVector<T>(*results), results->count(), results->count());
        }

int addResults | ( | int | index,
|  | const QVector< T > * | results,
|  | int | totalCount
| ) |  | `[inline]`

Search for all occurrences

Definition at line 178 of file qtconcurrentresultstore.h.

        {
            return ResultStoreBase::addResults(index, new QVector<T>(*results), results->count(), totalCount);
        }

int addCanceledResult | ( | int | index | ) | `[inline]`

Search for all occurrences

Definition at line 183 of file qtconcurrentresultstore.h.

        {
            return addResult(index, 0);
        }

int addCanceledResults | ( | int | index,
|  | int | _count
| ) |  | `[inline]`

Search for all occurrences

Definition at line 188 of file qtconcurrentresultstore.h.

        {
            QVector<T> empty;
            return addResults(index, &empty, _count);
        }

ResultIterator<T> begin | ( |  | ) | const `[inline]`

Search for all occurrences

Reimplemented from ResultStoreBase.

Definition at line 194 of file qtconcurrentresultstore.h.

        {
            return static_cast<ResultIterator<T> >(ResultStoreBase::begin());
        }

ResultIterator<T> end | ( |  | ) | const `[inline]`

Search for all occurrences

Reimplemented from ResultStoreBase.

Definition at line 199 of file qtconcurrentresultstore.h.

        {
            return static_cast<ResultIterator<T> >(ResultStoreBase::end());
        }

ResultIterator<T> resultAt | ( | int | index | ) | const `[inline]`

Search for all occurrences

Reimplemented from ResultStoreBase.

Definition at line 204 of file qtconcurrentresultstore.h.

        {
            return static_cast<ResultIterator<T> >(ResultStoreBase::resultAt(index));
        }

void clear | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 209 of file qtconcurrentresultstore.h.

        {
            QMap<int, ResultItem>::const_iterator mapIterator = m_results.constBegin();
            while (mapIterator != m_results.constEnd()) {
                if (mapIterator.value().isVector())
                    delete reinterpret_cast<const QVector<T> *>(mapIterator.value().result);
                else
                    delete reinterpret_cast<const T *>(mapIterator.value().result);
                ++mapIterator;
            }
            resultCount = 0;
            m_results.clear();
        }

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

- QtCore/qtconcurrentresultstore.h