![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\typealias Tasking::GroupItems More...
#include <tasktree.h>
Classes | |
struct | GroupData |
struct | GroupHandler |
struct | TaskHandler |
Public Types | |
using | GroupSetupHandler = std::function<SetupResult()> |
using | GroupDoneHandler = std::function<DoneResult(DoneWith)> |
Public Member Functions | |
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) |
Protected Types | |
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 | |
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 | |
static GroupItem | groupHandler (const GroupHandler &handler) |
template<typename Result, typename Function, typename ... Args, typename DecayedFunction = std::decay_t<Function>> | |
static constexpr bool | isInvocable () |
Friends | |
class | ContainerNode |
class | TaskNode |
class | TaskTreePrivate |
class | ParallelLimitFunctor |
class | WorkflowPolicyFunctor |
TASKING_EXPORT friend Group | operator>> (const For &forItem, const Do &doItem) |
\typealias Tasking::GroupItems
Type alias for QList<GroupItem>.
\inheaderfile solutions/tasking/tasktree.h \inmodule TaskingSolution
GroupItem represents the basic element that may be a part of any Group. \reentrant
GroupItem is a basic element that may be a part of any \l {Tasking::Group} {Group}. It encapsulates the functionality provided by any GroupItem's subclass. It is a value type and it is safe to copy the GroupItem instance, even when it is originally created via the subclass' constructor.
There are four main kinds of GroupItem: \table \header
ConcurrentCallTask<ResultType>
or NetworkQueryTask
. Asynchronous tasks are the main reason for using a task tree. \row Definition at line 225 of file tasktree.h.
using Tasking::GroupItem::GroupDoneHandler = std::function<DoneResult(DoneWith)> |
Definition at line 231 of file tasktree.h.
using Tasking::GroupItem::GroupSetupHandler = std::function<SetupResult()> |
Definition at line 229 of file tasktree.h.
|
protected |
Definition at line 245 of file tasktree.h.
|
protected |
Definition at line 249 of file tasktree.h.
|
protected |
Definition at line 247 of file tasktree.h.
|
strongprotected |
Enumerator | |
---|---|
List | |
Group | |
GroupData | |
Storage | |
TaskHandler |
Definition at line 271 of file tasktree.h.
|
inline |
Constructs a GroupItem
element holding the storage object.
When the \l {Tasking::Group} {Group} element containing this GroupItem is entered by the running task tree, an instance of the StorageStruct
is created dynamically.
When that group is about to be left after its execution, the previously instantiated StorageStruct
is deleted.
The dynamically created instance of StorageStruct
is accessible from inside any handler body of the parent \l {Tasking::Group} {Group} element, including nested groups and its tasks, via the \l {Tasking::Storage::operator->()} {Storage::operator->()}, \l {Tasking::Storage::operator*()} {Storage::operator*()}, or Storage::activeStorage() method.
Definition at line 234 of file tasktree.h.
References GroupItem(), and Storage.
Referenced by GroupItem().
|
inline |
Constructs a GroupItem
element with a given list of items.
When this GroupItem
element is parsed by the TaskTree, it is simply replaced with its items.
This constructor is useful when constructing a \l {Tasking::Group} {Group} element with lists of GroupItem
elements:
If you want to create a subtree, use \l {Tasking::Group} {Group} instead.
GroupItem
with the \l {Tasking::Group} {Group} element, as \l {Tasking::Group} {Group} keeps its children nested after being parsed by the task tree, while this GroupItem
does not.Definition at line 239 of file tasktree.h.
References List.
|
inline |
Definition at line 240 of file tasktree.h.
References List.
|
inlineprotected |
Definition at line 243 of file tasktree.h.
References GroupItem().
|
protecteddefault |
|
inlineprotected |
Definition at line 280 of file tasktree.h.
|
inlineprotected |
Definition at line 281 of file tasktree.h.
References GroupItem(), and GroupData.
Referenced by GroupItem(), and GroupItem().
|
inlineprotected |
Definition at line 284 of file tasktree.h.
References GroupItem(), and TaskHandler.
Referenced by Tasking::ExecutableItem::ExecutableItem(), and GroupItem().
|
protected |
Definition at line 1475 of file tasktree.cpp.
|
inlinestaticprotected |
Definition at line 289 of file tasktree.h.
Referenced by Tasking::Group::onGroupDone(), and Tasking::Group::onGroupSetup().
|
inlinestaticconstexprprotected |
Definition at line 294 of file tasktree.h.
|
friend |
Definition at line 304 of file tasktree.h.
|
friend |
Definition at line 1294 of file tasktree.cpp.
|
friend |
Definition at line 307 of file tasktree.h.
|
friend |
Definition at line 305 of file tasktree.h.
|
friend |
Definition at line 306 of file tasktree.h.
|
friend |
Definition at line 308 of file tasktree.h.