![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inheaderfile solutions/tasking/tasktree.h \inmodule TaskingSolution More...
#include <tasktree.h>
Public Member Functions | |
Group (const GroupItems &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 | |
Group | 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. | |
Group | 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> | |
Group | withCancel (SenderSignalPairGetter &&getter, std::initializer_list< GroupItem > postCancelRecipe={}) const |
template<typename SenderSignalPairGetter> | |
Group | withAccept (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 GroupItems &children) | |
Constructs a GroupItem element with a given list of items. | |
GroupItem (std::initializer_list< GroupItem > children) |
Static Public Member Functions | |
template<typename Handler> | |
static GroupItem | onGroupSetup (Handler &&handler) |
template<typename Handler> | |
static GroupItem | onGroupDone (Handler &&handler, CallDoneIf callDoneIf=CallDoneIf::SuccessOrError) |
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 (const Loop &loop) | |
GroupItem ()=default | |
GroupItem (Type type) | |
GroupItem (const GroupData &data) | |
GroupItem (const TaskHandler &handler) | |
void | addChildren (const GroupItems &children) |
Static Protected Member Functions inherited from Tasking::GroupItem | |
static GroupItem | groupHandler (const GroupHandler &handler) |
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 347 of file tasktree.h.
|
inline |
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 350 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 351 of file tasktree.h.
|
inlinestatic |
Definition at line 359 of file tasktree.h.
References Tasking::GroupItem::groupHandler().
|
inlinestatic |
Definition at line 355 of file tasktree.h.
References Tasking::GroupItem::groupHandler().