QtBase  v6.3.1
Classes | Public Types | Public Member Functions | Friends | List of all members
QFuture< T > Class Template Reference

#include <qfuture.h>

Classes

class  const_iterator
 

Public Types

template<class Function >
using ResultType = typename QtPrivate::ResultTypeHelper< Function, T >::ResultType
 
typedef const_iterator ConstIterator
 

Public Member Functions

 QFuture ()
 
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
 QFuture (QFutureInterface< T > *p)
 
template<typename U = T, typename = QtPrivate::EnableForVoid<U>>
 QFuture (QFutureInterfaceBase *p)
 
template<typename U , typename V = T, typename = QtPrivate::EnableForVoid<V>>
 QFuture (const QFuture< U > &other)
 
template<typename U , typename V = T, typename = QtPrivate::EnableForVoid<V>>
QFuture< void > & operator= (const QFuture< U > &other)
 
void cancel ()
 
bool isCanceled () const
 
bool isSuspending () const
 
bool isSuspended () const
 
void setSuspended (bool suspend)
 
void suspend ()
 
void resume ()
 
void toggleSuspended ()
 
bool isStarted () const
 
bool isFinished () const
 
bool isRunning () const
 
int resultCount () const
 
int progressValue () const
 
int progressMinimum () const
 
int progressMaximum () const
 
QString progressText () const
 
void waitForFinished ()
 
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
T result () const
 
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
T resultAt (int index) const
 
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
bool isResultReadyAt (int resultIndex) const
 
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
QList< Tresults () const
 
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
T takeResult ()
 
bool isValid () const
 
template<class Function >
QFuture< ResultType< Function > > then (Function &&function)
 
template<class Function >
QFuture< ResultType< Function > > then (QtFuture::Launch policy, Function &&function)
 
template<class Function >
QFuture< ResultType< Function > > then (QThreadPool *pool, Function &&function)
 
template<class Function >
QFuture< ResultType< Function > > then (QObject *context, Function &&function)
 
template<class Function , typename = std::enable_if_t<!QtPrivate::ArgResolver<Function>::HasExtraArgs>>
QFuture< TonFailed (Function &&handler)
 
template<class Function , typename = std::enable_if_t<!QtPrivate::ArgResolver<Function>::HasExtraArgs>>
QFuture< TonFailed (QObject *context, Function &&handler)
 
template<class Function , typename = std::enable_if_t<std::is_invocable_r_v<T, Function>>>
QFuture< TonCanceled (Function &&handler)
 
template<class Function , typename = std::enable_if_t<std::is_invocable_r_v<T, Function>>>
QFuture< TonCanceled (QObject *context, Function &&handler)
 
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator begin () const
 
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator constBegin () const
 
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator end () const
 
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator constEnd () const
 
template<class Function >
QFuture< typename QFuture< T >::template ResultType< Function > > then (Function &&function)
 
template<class Function >
QFuture< typename QFuture< T >::template ResultType< Function > > then (QtFuture::Launch policy, Function &&function)
 
template<class Function >
QFuture< typename QFuture< T >::template ResultType< Function > > then (QThreadPool *pool, Function &&function)
 
template<class Function >
QFuture< typename QFuture< T >::template ResultType< Function > > then (QObject *context, Function &&function)
 

Friends

class const_iterator
 
class QFutureWatcher< T >
 
template<class U >
class QFuture
 
class QFutureInterfaceBase
 
template<class Function , class ResultType , class ParentResultType >
class QtPrivate::Continuation
 
template<class Function , class ResultType >
class QtPrivate::CanceledHandler
 
template<class Function , class ResultType >
class QtPrivate::FailureHandler
 
template<typename ResultType >
struct QtPrivate::WhenAnyContext
 

Detailed Description

template<typename T>
class QFuture< T >

Definition at line 61 of file qfuture.h.

Member Typedef Documentation

◆ ConstIterator

template<typename T >
typedef const_iterator QFuture< T >::ConstIterator

Definition at line 284 of file qfuture.h.

◆ ResultType

template<typename T >
template<class Function >
using QFuture< T >::ResultType = typename QtPrivate::ResultTypeHelper<Function, T>::ResultType

Definition at line 164 of file qfuture.h.

Constructor & Destructor Documentation

◆ QFuture() [1/4]

template<typename T >
QFuture< T >::QFuture ( )
inline

Definition at line 67 of file qfuture.h.

◆ QFuture() [2/4]

template<typename T >
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
QFuture< T >::QFuture ( QFutureInterface< T > *  p)
inlineexplicit

Definition at line 72 of file qfuture.h.

◆ QFuture() [3/4]

template<typename T >
template<typename U = T, typename = QtPrivate::EnableForVoid<U>>
QFuture< T >::QFuture ( QFutureInterfaceBase p)
inlineexplicit

Definition at line 77 of file qfuture.h.

◆ QFuture() [4/4]

template<typename T >
template<typename U , typename V = T, typename = QtPrivate::EnableForVoid<V>>
QFuture< T >::QFuture ( const QFuture< U > &  other)
inlineexplicit

Definition at line 83 of file qfuture.h.

Member Function Documentation

◆ begin()

template<typename T >
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator QFuture< T >::begin ( ) const
inline

Definition at line 287 of file qfuture.h.

◆ cancel()

template<typename T >
void QFuture< T >::cancel ( )
inline

Definition at line 100 of file qfuture.h.

Here is the caller graph for this function:

◆ constBegin()

template<typename T >
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator QFuture< T >::constBegin ( ) const
inline

Definition at line 290 of file qfuture.h.

◆ constEnd()

template<typename T >
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator QFuture< T >::constEnd ( ) const
inline

Definition at line 296 of file qfuture.h.

◆ end()

template<typename T >
template<class U = T, typename = QtPrivate::EnableForNonVoid<U>>
const_iterator QFuture< T >::end ( ) const
inline

Definition at line 293 of file qfuture.h.

◆ isCanceled()

template<typename T >
bool QFuture< T >::isCanceled ( ) const
inline

Definition at line 101 of file qfuture.h.

Here is the caller graph for this function:

◆ isFinished()

template<typename T >
bool QFuture< T >::isFinished ( ) const
inline

Definition at line 130 of file qfuture.h.

Here is the caller graph for this function:

◆ isResultReadyAt()

template<typename T >
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
bool QFuture< T >::isResultReadyAt ( int  resultIndex) const
inline

Definition at line 147 of file qfuture.h.

◆ isRunning()

template<typename T >
bool QFuture< T >::isRunning ( ) const
inline

Definition at line 131 of file qfuture.h.

◆ isStarted()

template<typename T >
bool QFuture< T >::isStarted ( ) const
inline

Definition at line 129 of file qfuture.h.

Here is the caller graph for this function:

◆ isSuspended()

template<typename T >
bool QFuture< T >::isSuspended ( ) const
inline

Definition at line 123 of file qfuture.h.

Here is the caller graph for this function:

◆ isSuspending()

template<typename T >
bool QFuture< T >::isSuspending ( ) const
inline

Definition at line 122 of file qfuture.h.

◆ isValid()

template<typename T >
bool QFuture< T >::isValid ( ) const
inline

Definition at line 161 of file qfuture.h.

◆ onCanceled() [1/2]

template<class T >
template<class Function , typename >
QFuture< T > QFuture< T >::onCanceled ( Function &&  handler)

Definition at line 416 of file qfuture.h.

Here is the call graph for this function:

◆ onCanceled() [2/2]

template<class T >
template<class Function , typename >
QFuture< T > QFuture< T >::onCanceled ( QObject context,
Function &&  handler 
)

Definition at line 426 of file qfuture.h.

Here is the call graph for this function:

◆ onFailed() [1/2]

template<class T >
template<class Function , typename >
QFuture< T > QFuture< T >::onFailed ( Function &&  handler)

Definition at line 394 of file qfuture.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onFailed() [2/2]

template<class T >
template<class Function , typename >
QFuture< T > QFuture< T >::onFailed ( QObject context,
Function &&  handler 
)

Definition at line 404 of file qfuture.h.

Here is the call graph for this function:

◆ operator=()

template<typename T >
template<typename U , typename V = T, typename = QtPrivate::EnableForVoid<V>>
QFuture<void>& QFuture< T >::operator= ( const QFuture< U > &  other)
inline

Definition at line 88 of file qfuture.h.

Here is the call graph for this function:

◆ progressMaximum()

template<typename T >
int QFuture< T >::progressMaximum ( ) const
inline

Definition at line 136 of file qfuture.h.

◆ progressMinimum()

template<typename T >
int QFuture< T >::progressMinimum ( ) const
inline

Definition at line 135 of file qfuture.h.

◆ progressText()

template<typename T >
QString QFuture< T >::progressText ( ) const
inline

Definition at line 137 of file qfuture.h.

◆ progressValue()

template<typename T >
int QFuture< T >::progressValue ( ) const
inline

Definition at line 134 of file qfuture.h.

◆ result()

template<typename T >
template<typename U , typename >
T QFuture< T >::result
inline

Definition at line 331 of file qfuture.h.

Here is the caller graph for this function:

◆ resultAt()

template<typename T >
template<typename U , typename >
T QFuture< T >::resultAt ( int  index) const
inline

Definition at line 339 of file qfuture.h.

Here is the caller graph for this function:

◆ resultCount()

template<typename T >
int QFuture< T >::resultCount ( ) const
inline

Definition at line 133 of file qfuture.h.

Here is the caller graph for this function:

◆ results()

template<typename T >
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
QList<T> QFuture< T >::results ( ) const
inline

Definition at line 150 of file qfuture.h.

Here is the caller graph for this function:

◆ resume()

template<typename T >
void QFuture< T >::resume ( )
inline

Definition at line 126 of file qfuture.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSuspended()

template<typename T >
void QFuture< T >::setSuspended ( bool  suspend)
inline

Definition at line 124 of file qfuture.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ suspend()

template<typename T >
void QFuture< T >::suspend ( )
inline

Definition at line 125 of file qfuture.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ takeResult()

template<typename T >
template<typename U = T, typename = QtPrivate::EnableForNonVoid<U>>
T QFuture< T >::takeResult ( )
inline

Definition at line 153 of file qfuture.h.

Here is the caller graph for this function:

◆ then() [1/8]

template<typename T >
template<class Function >
QFuture<ResultType<Function> > QFuture< T >::then ( Function &&  function)
Here is the caller graph for this function:

◆ then() [2/8]

template<typename T >
template<class Function >
QFuture<typename QFuture<T>::template ResultType<Function> > QFuture< T >::then ( Function &&  function)

Definition at line 353 of file qfuture.h.

◆ then() [3/8]

template<typename T >
template<class Function >
QFuture<ResultType<Function> > QFuture< T >::then ( QObject context,
Function &&  function 
)

◆ then() [4/8]

template<typename T >
template<class Function >
QFuture<typename QFuture<T>::template ResultType<Function> > QFuture< T >::then ( QObject context,
Function &&  function 
)

Definition at line 382 of file qfuture.h.

Here is the call graph for this function:

◆ then() [5/8]

template<typename T >
template<class Function >
QFuture<ResultType<Function> > QFuture< T >::then ( QtFuture::Launch  policy,
Function &&  function 
)

◆ then() [6/8]

template<typename T >
template<class Function >
QFuture<typename QFuture<T>::template ResultType<Function> > QFuture< T >::then ( QtFuture::Launch  policy,
Function &&  function 
)

Definition at line 361 of file qfuture.h.

Here is the call graph for this function:

◆ then() [7/8]

template<typename T >
template<class Function >
QFuture<ResultType<Function> > QFuture< T >::then ( QThreadPool pool,
Function &&  function 
)

◆ then() [8/8]

template<typename T >
template<class Function >
QFuture<typename QFuture<T>::template ResultType<Function> > QFuture< T >::then ( QThreadPool pool,
Function &&  function 
)

Definition at line 371 of file qfuture.h.

Here is the call graph for this function:

◆ toggleSuspended()

template<typename T >
void QFuture< T >::toggleSuspended ( )
inline

Definition at line 127 of file qfuture.h.

◆ waitForFinished()

template<typename T >
void QFuture< T >::waitForFinished ( )
inline

Definition at line 138 of file qfuture.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ const_iterator

template<typename T >
friend class const_iterator
friend

Definition at line 283 of file qfuture.h.

◆ QFuture

template<typename T >
template<class U >
friend class QFuture
friend

Definition at line 302 of file qfuture.h.

◆ QFutureInterfaceBase

template<typename T >
friend class QFutureInterfaceBase
friend

Definition at line 304 of file qfuture.h.

◆ QFutureWatcher< T >

template<typename T >
friend class QFutureWatcher< T >
friend

Definition at line 296 of file qfuture.h.

◆ QtPrivate::CanceledHandler

template<typename T >
template<class Function , class ResultType >
friend class QtPrivate::CanceledHandler
friend

Definition at line 310 of file qfuture.h.

◆ QtPrivate::Continuation

template<typename T >
template<class Function , class ResultType , class ParentResultType >
friend class QtPrivate::Continuation
friend

Definition at line 307 of file qfuture.h.

◆ QtPrivate::FailureHandler

template<typename T >
template<class Function , class ResultType >
friend class QtPrivate::FailureHandler
friend

Definition at line 314 of file qfuture.h.

◆ QtPrivate::WhenAnyContext

template<typename T >
template<typename ResultType >
friend struct QtPrivate::WhenAnyContext
friend

Definition at line 318 of file qfuture.h.


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