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

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes

# ResultReporter< T > Class Template Reference

Search for all occurrences

## Detailed Description

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

Definition at line 106 of file qtconcurrentiteratekernel.h.

`#include <qtconcurrentiteratekernel.h>`

List of all members.

## Public Member Functions
| ResultReporter (ThreadEngine< T > *_threadEngine)
void | reserveSpace (int resultCount)
void | reportResults (int begin)
T * | getPointer ()
## Public Attributes
int | currentResultCount
ThreadEngine< T > * | threadEngine
QVector< T > | vector

## Constructor & Destructor Documentation

ResultReporter | ( | ThreadEngine< T > * | _threadEngine | ) | `[inline]`

Definition at line 109 of file qtconcurrentiteratekernel.h.

        :threadEngine(_threadEngine)
        {

        }

## Member Function Documentation

void reserveSpace | ( | int | resultCount | ) | `[inline]`

Search for all occurrences

Definition at line 115 of file qtconcurrentiteratekernel.h.

        {
            currentResultCount = resultCount;
            vector.resize(qMax(resultCount, vector.count()));
        }

void reportResults | ( | int | begin | ) | `[inline]`

Search for all occurrences

Definition at line 121 of file qtconcurrentiteratekernel.h.

        {
            const int useVectorThreshold = 4; // Tunable parameter.
            if (currentResultCount > useVectorThreshold) {
                vector.resize(currentResultCount);
                threadEngine->reportResults(vector, begin);
            } else {
                for (int i = 0; i < currentResultCount; ++i)
                    threadEngine->reportResult(&vector.at(i), begin + i);
            }
        }

T* getPointer | ( |  | ) | `[inline]`

Search for all occurrences

Definition at line 133 of file qtconcurrentiteratekernel.h.

        {
            return vector.data();
        }

## Member Data Documentation

int currentResultCount

Search for all occurrences

Definition at line 138 of file qtconcurrentiteratekernel.h.

ThreadEngine<T>* threadEngine

Search for all occurrences

Definition at line 139 of file qtconcurrentiteratekernel.h.

QVector<T> vector

Search for all occurrences

Definition at line 140 of file qtconcurrentiteratekernel.h.

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

- QtCore/qtconcurrentiteratekernel.h