Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QtPrivate::Continuation< Function, ResultType, ParentResultType > Class Template Referenceabstract

#include <qfuture_impl.h>

+ Inheritance diagram for QtPrivate::Continuation< Function, ResultType, ParentResultType >:
+ Collaboration diagram for QtPrivate::Continuation< Function, ResultType, ParentResultType >:

Public Member Functions

template<typename F = Function>
 Continuation (F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p)
 
virtual ~Continuation ()=default
 
bool execute ()
 

Static Public Member Functions

template<typename F = Function>
static void create (F &&func, QFuture< ParentResultType > *f, QFutureInterface< ResultType > &fi, QtFuture::Launch policy)
 
template<typename F = Function>
static void create (F &&func, QFuture< ParentResultType > *f, QFutureInterface< ResultType > &fi, QThreadPool *pool)
 
template<typename F = Function>
static void create (F &&func, QFuture< ParentResultType > *f, QFutureInterface< ResultType > &fi, QObject *context)
 

Protected Member Functions

virtual void runImpl ()=0
 
void runFunction ()
 

Protected Attributes

QPromise< ResultType > promise
 
QFuture< ParentResultType > parentFuture
 
Function function
 

Detailed Description

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

Definition at line 290 of file qfuture_impl.h.

Constructor & Destructor Documentation

◆ Continuation()

template<typename Function , typename ResultType , typename ParentResultType >
template<typename F = Function>
QtPrivate::Continuation< Function, ResultType, ParentResultType >::Continuation ( F &&  func,
const QFuture< ParentResultType > &  f,
QPromise< ResultType > &&  p 
)
inline

Definition at line 294 of file qfuture_impl.h.

◆ ~Continuation()

template<typename Function , typename ResultType , typename ParentResultType >
virtual QtPrivate::Continuation< Function, ResultType, ParentResultType >::~Continuation ( )
virtualdefault

Member Function Documentation

◆ create() [1/3]

template<typename Function , typename ResultType , typename ParentResultType >
template<typename F >
void QtPrivate::Continuation< Function, ResultType, ParentResultType >::create ( F &&  func,
QFuture< ParentResultType > *  f,
QFutureInterface< ResultType > &  fi,
QObject context 
)
static

Definition at line 595 of file qfuture_impl.h.

References QObject::connect(), context, QObject::deleteLater(), QObject::destroyed(), QtPrivate::Continuation< Function, ResultType, ParentResultType >::execute(), fi, QtPrivate::QBasicFutureWatcher::finished(), parent, Q_ASSERT, and watcher.

+ Here is the call graph for this function:

◆ create() [2/3]

template<typename Function , typename ResultType , typename ParentResultType >
template<typename F >
void QtPrivate::Continuation< Function, ResultType, ParentResultType >::create ( F &&  func,
QFuture< ParentResultType > *  f,
QFutureInterface< ResultType > &  fi,
QtFuture::Launch  policy 
)
static

Definition at line 517 of file qfuture_impl.h.

References QtFuture::Async, QtPrivate::Continuation< Function, ResultType, ParentResultType >::execute(), fi, QFutureInterface< T >::future(), QtFuture::Inherit, parent, policy, pool, and Q_ASSERT.

+ Here is the call graph for this function:

◆ create() [3/3]

template<typename Function , typename ResultType , typename ParentResultType >
template<typename F >
void QtPrivate::Continuation< Function, ResultType, ParentResultType >::create ( F &&  func,
QFuture< ParentResultType > *  f,
QFutureInterface< ResultType > &  fi,
QThreadPool pool 
)
static

Definition at line 567 of file qfuture_impl.h.

References fi, QFutureInterface< T >::future(), parent, pool, and Q_ASSERT.

+ Here is the call graph for this function:

◆ execute()

template<typename Function , typename ResultType , typename ParentResultType >
bool QtPrivate::Continuation< Function, ResultType, ParentResultType >::execute

Definition at line 465 of file qfuture_impl.h.

References Q_ASSERT.

Referenced by QtPrivate::Continuation< Function, ResultType, ParentResultType >::create(), and QtPrivate::Continuation< Function, ResultType, ParentResultType >::create().

+ Here is the caller graph for this function:

◆ runFunction()

template<typename Function , typename ResultType , typename ParentResultType >
void QtPrivate::Continuation< Function, ResultType, ParentResultType >::runFunction
protected

Definition at line 419 of file qfuture_impl.h.

References QtPrivate::fulfillPromise(), function, and Q_ASSERT.

Referenced by QtPrivate::AsyncContinuation< Function, ResultType, ParentResultType >::run(), and QtPrivate::SyncContinuation< Function, ResultType, ParentResultType >::runImpl().

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

◆ runImpl()

template<typename Function , typename ResultType , typename ParentResultType >
virtual void QtPrivate::Continuation< Function, ResultType, ParentResultType >::runImpl ( )
protectedpure virtual

Member Data Documentation

◆ function

template<typename Function , typename ResultType , typename ParentResultType >
Function QtPrivate::Continuation< Function, ResultType, ParentResultType >::function
protected

Definition at line 330 of file qfuture_impl.h.

◆ parentFuture

template<typename Function , typename ResultType , typename ParentResultType >
QFuture<ParentResultType> QtPrivate::Continuation< Function, ResultType, ParentResultType >::parentFuture
protected

Definition at line 329 of file qfuture_impl.h.

◆ promise

template<typename Function , typename ResultType , typename ParentResultType >
QPromise<ResultType> QtPrivate::Continuation< Function, ResultType, ParentResultType >::promise
protected

Definition at line 328 of file qfuture_impl.h.


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