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
qstdweb::Promise Class Reference

#include <qstdweb_p.h>

Collaboration diagram for qstdweb::Promise:

Classes

class  State

Public Member Functions

template<typename... Args>
 Promise (emscripten::val target, QString methodName, Args... args)
 Promise (emscripten::val promise)
 Promise (const std::vector< Promise > &promises)
PromiseaddThenFunction (std::function< void(emscripten::val)> thenFunc)
PromiseaddCatchFunction (std::function< void(emscripten::val)> catchFunc)
PromiseaddFinallyFunction (std::function< void()> finallyFunc)
void suspendExclusive ()
emscripten::val getPromise () const

Static Public Member Functions

static uint32_t Q_CORE_EXPORT adoptPromise (emscripten::val promise, PromiseCallbacks callbacks, QList< uint32_t > *handlers=nullptr)
template<typename... Args>
static uint32_t make (emscripten::val target, QString methodName, PromiseCallbacks callbacks, Args... args)
template<typename... Args>
static void make (QList< uint32_t > &handlers, emscripten::val target, QString methodName, PromiseCallbacks callbacks, Args... args)
static void Q_CORE_EXPORT suspendExclusive (QList< uint32_t > handlerIndices)
static void Q_CORE_EXPORT all (std::vector< emscripten::val > promises, PromiseCallbacks callbacks)

Detailed Description

Definition at line 242 of file qstdweb_p.h.

Constructor & Destructor Documentation

◆ Promise() [1/3]

template<typename... Args>
qstdweb::Promise::Promise ( emscripten::val target,
QString methodName,
Args... args )
inline

Definition at line 245 of file qstdweb_p.h.

◆ Promise() [2/3]

qstdweb::Promise::Promise ( emscripten::val promise)
inline

Definition at line 255 of file qstdweb_p.h.

◆ Promise() [3/3]

qstdweb::Promise::Promise ( const std::vector< Promise > & promises)
inline

Definition at line 264 of file qstdweb_p.h.

Member Function Documentation

◆ addCatchFunction()

Promise & qstdweb::Promise::addCatchFunction ( std::function< void(emscripten::val)> catchFunc)

Definition at line 498 of file qstdweb.cpp.

◆ addFinallyFunction()

Promise & qstdweb::Promise::addFinallyFunction ( std::function< void()> finallyFunc)

Definition at line 514 of file qstdweb.cpp.

◆ addThenFunction()

Promise & qstdweb::Promise::addThenFunction ( std::function< void(emscripten::val)> thenFunc)

Definition at line 482 of file qstdweb.cpp.

◆ adoptPromise()

uint32_t qstdweb::Promise::adoptPromise ( emscripten::val promise,
PromiseCallbacks callbacks,
QList< uint32_t > * handlers = nullptr )
static

Definition at line 562 of file qstdweb.cpp.

◆ all()

void qstdweb::Promise::all ( std::vector< emscripten::val > promises,
PromiseCallbacks callbacks )
static

Definition at line 637 of file qstdweb.cpp.

◆ getPromise()

emscripten::val qstdweb::Promise::getPromise ( ) const

Definition at line 557 of file qstdweb.cpp.

◆ make() [1/2]

template<typename... Args>
uint32_t qstdweb::Promise::make ( emscripten::val target,
QString methodName,
PromiseCallbacks callbacks,
Args... args )
inlinestatic

Definition at line 313 of file qstdweb_p.h.

◆ make() [2/2]

template<typename... Args>
void qstdweb::Promise::make ( QList< uint32_t > & handlers,
emscripten::val target,
QString methodName,
PromiseCallbacks callbacks,
Args... args )
inlinestatic

Definition at line 328 of file qstdweb_p.h.

◆ suspendExclusive() [1/2]

void qstdweb::Promise::suspendExclusive ( )

Definition at line 552 of file qstdweb.cpp.

◆ suspendExclusive() [2/2]

void qstdweb::Promise::suspendExclusive ( QList< uint32_t > handlerIndices)
static

Definition at line 629 of file qstdweb.cpp.


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