Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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.
 
template<typename Callable , if_callable< Callable > = true>
 QGenericRunnable (Callable &&c)
 
 ~QGenericRunnable () override
 
void run () override
 

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 146 of file qtconcurrentiteratekernel.h.

Member Typedef Documentation

◆ ResultType

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

Definition at line 151 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 154 of file qtconcurrentiteratekernel.h.

◆ 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 166 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 179 of file qtconcurrentiteratekernel.h.

◆ ~IterateKernel()

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

Definition at line 191 of file qtconcurrentiteratekernel.h.

Member Function Documentation

◆ forThreadFunction()

◆ 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

◆ start()

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

Reimplemented from QtConcurrent::ThreadEngineBase.

Definition at line 196 of file qtconcurrentiteratekernel.h.

References QtConcurrent::ThreadEngineBase::isProgressReportingEnabled(), QtConcurrent::IterateKernel< Iterator, T >::iterationCount, QtConcurrent::IterateKernel< Iterator, T >::progressReportingEnabled, and QtConcurrent::ThreadEngineBase::setProgressRange().

+ Here is the call graph for this function:

◆ threadFunction()

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

Reimplemented from QtConcurrent::ThreadEngineBase.

Definition at line 211 of file qtconcurrentiteratekernel.h.

References QtConcurrent::IterateKernel< Iterator, T >::forIteration, QtConcurrent::IterateKernel< Iterator, T >::forThreadFunction(), and QtConcurrent::IterateKernel< Iterator, T >::whileThreadFunction().

+ Here is the call graph for this function:

◆ whileThreadFunction()

Member Data Documentation

◆ begin

template<typename Iterator , typename T >
const Iterator QtConcurrent::IterateKernel< Iterator, T >::begin

◆ completed

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

◆ current

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

◆ currentIndex

◆ defaultValue

template<typename Iterator , typename T >
DefaultValueContainer<ResultType> QtConcurrent::IterateKernel< Iterator, T >::defaultValue

Definition at line 325 of file qtconcurrentiteratekernel.h.

◆ end

template<typename Iterator , typename T >
const Iterator QtConcurrent::IterateKernel< Iterator, T >::end

Definition at line 317 of file qtconcurrentiteratekernel.h.

◆ forIteration

template<typename Iterator , typename T >
const bool QtConcurrent::IterateKernel< Iterator, T >::forIteration

◆ iterationCount

◆ iteratorThreads

◆ progressReportingEnabled

template<typename Iterator , typename T >
bool QtConcurrent::IterateKernel< Iterator, T >::progressReportingEnabled

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