Definition at line 138 of file qtconcurrentthreadengine.h.
#include <qtconcurrentthreadengine.h>

Public Types |
|
| typedef T | ResultType |
Public Member Functions |
|
| virtual T * | result () |
| QFutureInterface< T > * | futureInterfaceTyped () |
| T * | startSingleThreaded () |
| T * | startBlocking () |
| QFuture< T > | startAsynchronously () |
| void | asynchronousFinish () |
| void | reportResult (const T *_result, int index=-1) |
| void | reportResults (const QVector< T > &_result, int index=-1, int count=-1) |
| typedef T ResultType |
Reimplemented in FilterKernel< Sequence, KeepFunctor, ReduceFunctor >, FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >, FilteredEachKernel< Iterator, KeepFunctor >, IterateKernel< Iterator, T >, MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >, MappedEachKernel< Iterator, MapFunctor >, IterateKernel< Iterator, void >, IterateKernel< Iterator, MapFunctor::result_type >, IterateKernel< Iterator, qValueType< Iterator >::value_type >, IterateKernel< Sequence::const_iterator, void >, and IterateKernel< Iterator, ReducedResultType >.
Definition at line 141 of file qtconcurrentthreadengine.h.
| virtual T* result | ( | ) | [inline, virtual] |
Reimplemented in FilteredReducedKernel< ReducedResultType, Iterator, KeepFunctor, ReduceFunctor, Reducer >, and MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >.
Definition at line 143 of file qtconcurrentthreadengine.h.
{ return 0; }
| QFutureInterface<T>* futureInterfaceTyped | ( | ) | [inline] |
Definition at line 145 of file qtconcurrentthreadengine.h.
{
return static_cast<QFutureInterface<T> *>(futureInterface);
}
| T* startSingleThreaded | ( | ) | [inline] |
Reimplemented from ThreadEngineBase.
Definition at line 151 of file qtconcurrentthreadengine.h.
{
ThreadEngineBase::startSingleThreaded();
return result();
}
| T* startBlocking | ( | ) | [inline] |
Reimplemented from ThreadEngineBase.
Definition at line 160 of file qtconcurrentthreadengine.h.
{
ThreadEngineBase::startBlocking();
return result();
}
| QFuture<T> startAsynchronously | ( | ) | [inline] |
Definition at line 168 of file qtconcurrentthreadengine.h.
{
futureInterface = new QFutureInterface<T>();
// reportStart() must be called before starting threads, otherwise the
// user algorithm might finish while reportStart() is running, which
// is very bad.
futureInterface->reportStarted();
QFuture<T> future = QFuture<T>(futureInterfaceTyped());
start();
acquireBarrierSemaphore();
threadPool->start(this);
return future;
}
| void asynchronousFinish | ( | ) | [inline, virtual] |
Implements ThreadEngineBase.
Definition at line 184 of file qtconcurrentthreadengine.h.
{
finish();
futureInterfaceTyped()->reportFinished(result());
delete futureInterfaceTyped();
delete this;
}
| void reportResult | ( | const T * | _result, |
| int | index = -1 |
||
| ) | [inline] |
Definition at line 193 of file qtconcurrentthreadengine.h.
{
if (futureInterface)
futureInterfaceTyped()->reportResult(_result, index);
}
| void reportResults | ( | const QVector< T > & | _result, |
| int | index = -1, |
||
| int | count = -1 |
||
| ) | [inline] |
Definition at line 199 of file qtconcurrentthreadengine.h.
{
if (futureInterface)
futureInterfaceTyped()->reportResults(_result, index, count);
}