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
QtPrivate::CompactContinuation< Function, ResultType, ParentResultType > Class Template Reference

#include <qfuture_impl.h>

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

Public Types

using Storage = CompactStorage<Function>
 

Public Member Functions

template<typename F = Function>
 CompactContinuation (F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p)
 
template<typename F = Function>
 CompactContinuation (F &&func, const QFuture< ParentResultType > &f, QPromise< ResultType > &&p, QThreadPool *pool)
 
 ~CompactContinuation ()
 
bool execute ()
 
QRunnablerunnable () const
 

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 Types

enum class  Type : quint8 { Sync , Async }
 

Protected Member Functions

void runImpl ()
 
void runFunction ()
 

Protected Attributes

QPromise< ResultType > promise
 
QFuture< ParentResultType > parentFuture
 
QThreadPoolthreadPool = nullptr
 
QRunnablerunObj = nullptr
 
const Type type
 

Detailed Description

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

Definition at line 290 of file qfuture_impl.h.

Member Typedef Documentation

◆ Storage

template<typename Function, typename ResultType, typename ParentResultType>
using QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::Storage = CompactStorage<Function>

Definition at line 294 of file qfuture_impl.h.

Member Enumeration Documentation

◆ Type

template<typename Function, typename ResultType, typename ParentResultType>
enum class QtPrivate::CompactContinuation::Type : quint8
strongprotected
Enumerator
Sync 
Async 

Definition at line 356 of file qfuture_impl.h.

Constructor & Destructor Documentation

◆ CompactContinuation() [1/2]

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

Definition at line 297 of file qfuture_impl.h.

References CompactContinuation().

Referenced by CompactContinuation().

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

◆ CompactContinuation() [2/2]

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

Definition at line 303 of file qfuture_impl.h.

References CompactContinuation().

Referenced by CompactContinuation().

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

◆ ~CompactContinuation()

template<typename Function, typename ResultType, typename ParentResultType>
QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::~CompactContinuation ( )
inline

Definition at line 315 of file qfuture_impl.h.

Member Function Documentation

◆ create() [1/3]

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

Definition at line 588 of file qfuture_impl.h.

References execute().

+ Here is the call graph for this function:

◆ create() [2/3]

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

Definition at line 508 of file qfuture_impl.h.

References QFutureInterface< T >::~QFutureInterface(), QtFuture::Async, execute(), and QtFuture::Inherit.

+ Here is the call graph for this function:

◆ create() [3/3]

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

Definition at line 559 of file qfuture_impl.h.

References QFutureInterface< T >::~QFutureInterface().

+ Here is the call graph for this function:

◆ execute()

template<typename Function, typename ResultType, typename ParentResultType>
bool QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::execute ( )

Definition at line 451 of file qfuture_impl.h.

References promise, and runImpl().

Referenced by create(), and create().

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

◆ runFunction()

template<typename Function, typename ResultType, typename ParentResultType>
void QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::runFunction ( )
protected

Definition at line 405 of file qfuture_impl.h.

References promise.

Referenced by runImpl().

+ Here is the caller graph for this function:

◆ runImpl()

template<typename Function, typename ResultType, typename ParentResultType>
void QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::runImpl ( )
inlineprotected

Definition at line 342 of file qfuture_impl.h.

References runFunction(), and type.

Referenced by execute().

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

◆ runnable()

template<typename Function, typename ResultType, typename ParentResultType>
QRunnable * QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::runnable ( ) const
inline

Definition at line 319 of file qfuture_impl.h.

Member Data Documentation

◆ parentFuture

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

Definition at line 362 of file qfuture_impl.h.

◆ promise

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

Definition at line 361 of file qfuture_impl.h.

Referenced by execute(), and runFunction().

◆ runObj

template<typename Function, typename ResultType, typename ParentResultType>
QRunnable* QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::runObj = nullptr
protected

Definition at line 364 of file qfuture_impl.h.

◆ threadPool

template<typename Function, typename ResultType, typename ParentResultType>
QThreadPool* QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::threadPool = nullptr
protected

Definition at line 363 of file qfuture_impl.h.

◆ type

template<typename Function, typename ResultType, typename ParentResultType>
const Type QtPrivate::CompactContinuation< Function, ResultType, ParentResultType >::type
protected

Definition at line 365 of file qfuture_impl.h.

Referenced by runImpl().


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