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>.
|
\inheaderfile solutions/tasking/tasktree.h \inmodule TaskingSolution More...
#include <tasktree.h>
Public Member Functions | |
Group (const QList< GroupItem > &children) | |
Constructs a group with a given list of children. | |
Group (std::initializer_list< GroupItem > children) | |
Constructs a group from std::initializer_list given by children. | |
Public Member Functions inherited from Tasking::ExecutableItem | |
ExecutableItem | withTimeout (std::chrono::milliseconds timeout, const std::function< void()> &handler={}) const |
Attaches TimeoutTask to a copy of this ExecutableItem, elapsing after timeout in milliseconds, with an optionally provided timeout handler, and returns the coupled item. | |
ExecutableItem | withLog (const QString &logName) const |
Attaches a custom debug printout to a copy of this ExecutableItem, issued on task startup and after the task is finished, and returns the coupled item. | |
template<typename SenderSignalPairGetter > | |
ExecutableItem | withCancel (SenderSignalPairGetter &&getter) const |
Public Member Functions inherited from Tasking::GroupItem | |
template<typename StorageStruct > | |
GroupItem (const Storage< StorageStruct > &storage) | |
Constructs a GroupItem element holding the storage object. | |
GroupItem (const Loop &loop) | |
GroupItem (const QList< GroupItem > &children) | |
Constructs a GroupItem element with a given list of items. | |
GroupItem (std::initializer_list< GroupItem > children) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Static Public Member Functions | |
template<typename Handler > | |
static GroupItem | onGroupSetup (Handler &&handler) |
template<typename Handler > | |
static GroupItem | onGroupDone (Handler &&handler, CallDoneIf callDoneIf=CallDoneIf::SuccessOrError) |
static GroupItem | parallelLimit (int limit) |
static GroupItem | workflowPolicy (WorkflowPolicy policy) |
Additional Inherited Members | |
Public Types inherited from Tasking::GroupItem | |
using | GroupSetupHandler = std::function<SetupResult()> |
using | GroupDoneHandler = std::function<DoneResult(DoneWith)> |
Protected Types inherited from Tasking::GroupItem | |
enum class | Type { List , Group , GroupData , Storage , TaskHandler } |
using | InterfaceCreateHandler = std::function<TaskInterface *(void)> |
using | InterfaceSetupHandler = std::function<SetupResult(TaskInterface &)> |
using | InterfaceDoneHandler = std::function<DoneResult(const TaskInterface &, DoneWith)> |
Protected Member Functions inherited from Tasking::ExecutableItem | |
ExecutableItem ()=default | |
ExecutableItem (const TaskHandler &handler) | |
Protected Member Functions inherited from Tasking::GroupItem | |
GroupItem ()=default | |
GroupItem (Type type) | |
GroupItem (const GroupData &data) | |
GroupItem (const TaskHandler &handler) | |
void | addChildren (const QList< GroupItem > &children) |
Static Protected Member Functions inherited from Tasking::GroupItem | |
static GroupItem | groupHandler (const GroupHandler &handler) |
static GroupItem | parallelLimit (int limit) |
static GroupItem | workflowPolicy (WorkflowPolicy policy) |
template<typename Result , typename Function , typename ... Args, typename DecayedFunction = std::decay_t<Function>> | |
static constexpr bool | isInvocable () |
\inheaderfile solutions/tasking/tasktree.h \inmodule TaskingSolution
Group represents the basic element for composing declarative recipes describing how to execute and handle a nested tree of asynchronous tasks. \reentrant
Group is a container for other group items. It encloses child tasks into one unit, which is seen by the group's parent as a single, asynchronous task. Since Group is of the GroupItem type, it may also be a child of Group.
Insert child tasks into the group by using aliased custom task names, such as, ConcurrentCallTask<ResultType>
or NetworkQueryTask:
The group's behavior may be customized by inserting the items returned by \l {Tasking::parallelLimit()} {parallelLimit()} or \l {Tasking::workflowPolicy()} {workflowPolicy()} functions:
The group may contain nested groups:
The group may dynamically instantiate a custom storage structure, which may be used for inter-task data exchange:
Definition at line 326 of file tasktree.h.
Constructs a group with a given list of children.
This constructor is useful when the child items of the group are not known at compile time, but later, at runtime:
Definition at line 329 of file tasktree.h.
|
inline |
Constructs a group from std::initializer_list
given by children.
This constructor is useful when all child items of the group are known at compile time:
Definition at line 330 of file tasktree.h.
|
inlinestatic |
Definition at line 338 of file tasktree.h.
|
inlinestatic |
Definition at line 334 of file tasktree.h.
|
inlinestatic |
Definition at line 274 of file tasktree.h.
Referenced by Tasking::parallelLimit().
|
inlinestatic |
Definition at line 275 of file tasktree.h.
Referenced by Tasking::workflowPolicy().