Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtConcurrent::IterateKernel< Iterator, T > Class Template Reference

\inmodule QtConcurrent More...

#include <qtconcurrentiteratekernel.h>

Inheritance diagram for QtConcurrent::IterateKernel< Iterator, T >:
Collaboration diagram for QtConcurrent::IterateKernel< Iterator, T >:

Public Types

typedef T ResultType
Public Types inherited from QtConcurrent::ThreadEngine< T >
typedef T ResultType
Public Types inherited from QRunnable
template<typename Callable>
using if_callable = std::enable_if_t<std::is_invocable_r_v<void, Callable>, bool>

Public Member Functions

template<typename U = T, std::enable_if_t< std::is_same_v< U, void >, bool > = true>
 IterateKernel (QThreadPool *pool, Iterator _begin, Iterator _end)
template<typename U = T, std::enable_if_t<!std::is_same_v< U, void >, bool > = true>
 IterateKernel (QThreadPool *pool, Iterator _begin, Iterator _end)
template<typename U = T, std::enable_if_t<!std::is_same_v< U, void >, bool > = true>
 IterateKernel (QThreadPool *pool, Iterator _begin, Iterator _end, U &&_defaultValue)
virtual ~IterateKernel ()
virtual bool runIteration (Iterator, int, T *)
virtual bool runIterations (Iterator, int, int, T *)
void start () override
bool shouldStartThread () override
ThreadFunctionResult threadFunction () override
ThreadFunctionResult forThreadFunction ()
ThreadFunctionResult whileThreadFunction ()
Public Member Functions inherited from QtConcurrent::ThreadEngine< T >
 ThreadEngine (QThreadPool *pool)
virtual T * result ()
QFutureInterface< T > * futureInterfaceTyped ()
T * startSingleThreaded ()
QFuture< T > startAsynchronously ()
void asynchronousFinish () override
void reportResult (const T *_result, int index=-1)
void reportResults (const QList< T > &_result, int index=-1, int count=-1)
Public Member Functions inherited from QtConcurrent::ThreadEngineBase
 ThreadEngineBase (QThreadPool *pool)
virtual ~ThreadEngineBase ()
void startSingleThreaded ()
void startThread ()
bool isCanceled ()
void waitForResume ()
bool isProgressReportingEnabled ()
void setProgressValue (int progress)
void setProgressRange (int minimum, int maximum)
void acquireBarrierSemaphore ()
void reportIfSuspensionDone () const
Public Member Functions inherited from QRunnable
constexpr QRunnable () noexcept=default
 Constructs a QRunnable.
virtual ~QRunnable ()
 QRunnable virtual destructor.
bool autoDelete () const
 Returns true is auto-deletion is enabled; false otherwise.
void setAutoDelete (bool autoDelete)
 Enables auto-deletion if autoDelete is true; otherwise auto-deletion is disabled.

Public Attributes

const Iterator begin
const Iterator end
Iterator current
QAtomicInt currentIndex
QAtomicInt iteratorThreads
QAtomicInt completed
const int iterationCount
const bool forIteration
bool progressReportingEnabled
DefaultValueContainer< ResultTypedefaultValue

Additional Inherited Members

Static Public Member Functions inherited from QRunnable
template<typename Callable, if_callable< Callable > = true>
static QRunnablecreate (Callable &&functionToRun)
static QRunnablecreate (std::nullptr_t)=delete
Protected Member Functions inherited from QtConcurrent::ThreadEngineBase
virtual void finish ()
virtual bool shouldThrottleThread ()
Protected Attributes inherited from QtConcurrent::ThreadEngineBase
QFutureInterfaceBasefutureInterface
QThreadPoolthreadPool
ThreadEngineBarrier barrier
QtPrivate::ExceptionStore exceptionStore
QBasicMutex mutex

Detailed Description

template<typename Iterator, typename T>
class QtConcurrent::IterateKernel< Iterator, T >

\inmodule QtConcurrent

Definition at line 147 of file qtconcurrentiteratekernel.h.

Member Typedef Documentation

◆ ResultType

template<typename Iterator, typename T>
typedef T QtConcurrent::IterateKernel< Iterator, T >::ResultType

Definition at line 152 of file qtconcurrentiteratekernel.h.

Constructor & Destructor Documentation

◆ IterateKernel() [1/3]

template<typename Iterator, typename T>
template<typename U = T, std::enable_if_t< std::is_same_v< U, void >, bool > = true>
QtConcurrent::IterateKernel< Iterator, T >::IterateKernel ( QThreadPool * pool,
Iterator _begin,
Iterator _end )
inline

Definition at line 155 of file qtconcurrentiteratekernel.h.

Referenced by QtConcurrent::IterateKernel< typename Sequence::const_iterator, void >::IterateKernel().

Here is the caller graph for this function:

◆ IterateKernel() [2/3]

template<typename Iterator, typename T>
template<typename U = T, std::enable_if_t<!std::is_same_v< U, void >, bool > = true>
QtConcurrent::IterateKernel< Iterator, T >::IterateKernel ( QThreadPool * pool,
Iterator _begin,
Iterator _end )
inline

Definition at line 167 of file qtconcurrentiteratekernel.h.

◆ IterateKernel() [3/3]

template<typename Iterator, typename T>
template<typename U = T, std::enable_if_t<!std::is_same_v< U, void >, bool > = true>
QtConcurrent::IterateKernel< Iterator, T >::IterateKernel ( QThreadPool * pool,
Iterator _begin,
Iterator _end,
U && _defaultValue )
inline

Definition at line 180 of file qtconcurrentiteratekernel.h.

Referenced by QtConcurrent::IterateKernel< typename Sequence::const_iterator, void >::IterateKernel().

Here is the caller graph for this function:

◆ ~IterateKernel()

template<typename Iterator, typename T>
virtual QtConcurrent::IterateKernel< Iterator, T >::~IterateKernel ( )
inlinevirtual

Definition at line 192 of file qtconcurrentiteratekernel.h.

Member Function Documentation

◆ forThreadFunction()

template<typename Iterator, typename T>
ThreadFunctionResult QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction ( )
inline

Definition at line 220 of file qtconcurrentiteratekernel.h.

◆ runIteration()

template<typename Iterator, typename T>
virtual bool QtConcurrent::IterateKernel< Iterator, T >::runIteration ( Iterator ,
int ,
T *  )
inlinevirtual

◆ runIterations()

template<typename Iterator, typename T>
virtual bool QtConcurrent::IterateKernel< Iterator, T >::runIterations ( Iterator ,
int ,
int ,
T *  )
inlinevirtual

◆ shouldStartThread()

template<typename Iterator, typename T>
bool QtConcurrent::IterateKernel< Iterator, T >::shouldStartThread ( )
inlineoverridevirtual

Reimplemented from QtConcurrent::ThreadEngineBase.

Reimplemented in QtConcurrent::MappedReducedKernel< ReducedResultType, Iterator, MapFunctor, ReduceFunctor, Reducer >.

Definition at line 204 of file qtconcurrentiteratekernel.h.

Referenced by QtConcurrent::IterateKernel< typename Sequence::const_iterator, void >::forThreadFunction(), and QtConcurrent::IterateKernel< typename Sequence::const_iterator, void >::whileThreadFunction().

Here is the caller graph for this function:

◆ start()

template<typename Iterator, typename T>
void QtConcurrent::IterateKernel< Iterator, T >::start ( )
inlineoverridevirtual

Reimplemented from QtConcurrent::ThreadEngineBase.

Definition at line 197 of file qtconcurrentiteratekernel.h.

◆ threadFunction()

template<typename Iterator, typename T>
ThreadFunctionResult QtConcurrent::IterateKernel< Iterator, T >::threadFunction ( )
inlineoverridevirtual

Reimplemented from QtConcurrent::ThreadEngineBase.

Definition at line 212 of file qtconcurrentiteratekernel.h.

◆ whileThreadFunction()

template<typename Iterator, typename T>
ThreadFunctionResult QtConcurrent::IterateKernel< Iterator, T >::whileThreadFunction ( )
inline

Definition at line 271 of file qtconcurrentiteratekernel.h.

Member Data Documentation

◆ begin

◆ completed

template<typename Iterator, typename T>
QAtomicInt QtConcurrent::IterateKernel< Iterator, T >::completed

Definition at line 322 of file qtconcurrentiteratekernel.h.

◆ current

◆ currentIndex

template<typename Iterator, typename T>
QAtomicInt QtConcurrent::IterateKernel< Iterator, T >::currentIndex

Definition at line 320 of file qtconcurrentiteratekernel.h.

◆ defaultValue

◆ end

◆ forIteration

◆ iterationCount

◆ iteratorThreads

template<typename Iterator, typename T>
QAtomicInt QtConcurrent::IterateKernel< Iterator, T >::iteratorThreads

Definition at line 321 of file qtconcurrentiteratekernel.h.

◆ progressReportingEnabled


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