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>.
Loading...
Searching...
No Matches
Tasking::TaskTreePrivate Class Reference
+ Collaboration diagram for Tasking::TaskTreePrivate:

Classes

struct  StorageHandler
 

Public Types

typedef StorageBase::StorageHandler StorageHandler::* HandlerPtr
 

Public Member Functions

 TaskTreePrivate (TaskTree *taskTree)
 
void start ()
 
void stop ()
 
void bumpAsyncCount ()
 
void advanceProgress (int byValue)
 
void emitDone (DoneWith result)
 
void callSetupHandler (StorageBase storage, StoragePtr storagePtr)
 
void callDoneHandler (StorageBase storage, StoragePtr storagePtr)
 
void callStorageHandler (StorageBase storage, StoragePtr storagePtr, HandlerPtr ptr)
 
SetupResult start (RuntimeTask *node)
 
void stop (RuntimeTask *node)
 
bool invokeDoneHandler (RuntimeTask *node, DoneWith doneWith)
 
SetupResult start (RuntimeContainer *container)
 
SetupResult continueStart (RuntimeContainer *container, SetupResult startAction)
 
SetupResult startChildren (RuntimeContainer *container)
 
SetupResult childDone (RuntimeIteration *iteration, bool success)
 
void stop (RuntimeContainer *container)
 
bool invokeDoneHandler (RuntimeContainer *container, DoneWith doneWith)
 
bool invokeLoopHandler (RuntimeContainer *container)
 
template<typename Container , typename Handler , typename ... Args, typename ReturnType = std::invoke_result_t<Handler, Args...>>
ReturnType invokeHandler (Container *container, Handler &&handler, Args &&...args)
 

Static Public Member Functions

static int effectiveLoopCount (const std::optional< Loop > &loop)
 

Public Attributes

TaskTreeq = nullptr
 
Guard m_guard
 
int m_progressValue = 0
 
int m_asyncCount = 0
 
QSet< StorageBasem_storages
 
QHash< StorageBase, StorageHandlerm_storageHandlers
 
std::optional< TaskNodem_root
 
std::unique_ptr< RuntimeTaskm_runtimeRoot
 

Detailed Description

Definition at line 1595 of file tasktree.cpp.

Member Typedef Documentation

◆ HandlerPtr

typedef StorageBase::StorageHandler StorageHandler::* Tasking::TaskTreePrivate::HandlerPtr

Definition at line 1618 of file tasktree.cpp.

Constructor & Destructor Documentation

◆ TaskTreePrivate()

Tasking::TaskTreePrivate::TaskTreePrivate ( TaskTree * taskTree)
inline

Definition at line 1600 of file tasktree.cpp.

Member Function Documentation

◆ advanceProgress()

void Tasking::TaskTreePrivate::advanceProgress ( int byValue)

Definition at line 1858 of file tasktree.cpp.

References emit, m_guard, m_progressValue, and QT_CHECK.

Referenced by invokeDoneHandler(), start(), start(), and stop().

+ Here is the caller graph for this function:

◆ bumpAsyncCount()

void Tasking::TaskTreePrivate::bumpAsyncCount ( )

Definition at line 1849 of file tasktree.cpp.

References emit, m_asyncCount, m_guard, and m_runtimeRoot.

Referenced by start().

+ Here is the caller graph for this function:

◆ callDoneHandler()

void Tasking::TaskTreePrivate::callDoneHandler ( StorageBase storage,
StoragePtr storagePtr )
inline

Definition at line 1611 of file tasktree.cpp.

References callStorageHandler(), Tasking::TaskTreePrivate::StorageHandler::m_doneHandler, and storage.

Referenced by Tasking::RuntimeContainer::~RuntimeContainer().

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

◆ callSetupHandler()

void Tasking::TaskTreePrivate::callSetupHandler ( StorageBase storage,
StoragePtr storagePtr )
inline

Definition at line 1608 of file tasktree.cpp.

References callStorageHandler(), Tasking::TaskTreePrivate::StorageHandler::m_setupHandler, and storage.

Referenced by Tasking::RuntimeContainer::createStorages().

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

◆ callStorageHandler()

void Tasking::TaskTreePrivate::callStorageHandler ( StorageBase storage,
StoragePtr storagePtr,
HandlerPtr ptr )
inline

Definition at line 1619 of file tasktree.cpp.

References it, m_guard, m_storageHandlers, ptr(), and storage.

Referenced by callDoneHandler(), and callSetupHandler().

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

◆ childDone()

SetupResult Tasking::TaskTreePrivate::childDone ( RuntimeIteration * iteration,
bool success )

Definition at line 2062 of file tasktree.cpp.

References Tasking::Continue, continueStart(), Tasking::RuntimeContainer::isStarting(), Tasking::RuntimeIteration::m_container, Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeIteration::m_doneCount, Tasking::RuntimeContainer::m_runningChildren, Tasking::ContainerNode::m_workflowPolicy, stop(), Tasking::StopOnError, Tasking::StopOnSuccess, Tasking::StopOnSuccessOrError, Tasking::toSetupResult(), Tasking::RuntimeContainer::updateSuccessBit(), and Tasking::workflowPolicy().

Referenced by continueStart(), and startChildren().

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

◆ continueStart()

SetupResult Tasking::TaskTreePrivate::continueStart ( RuntimeContainer * container,
SetupResult startAction )

Definition at line 1987 of file tasktree.cpp.

References childDone(), Tasking::Continue, Tasking::RuntimeIteration::deleteChild(), emitDone(), Tasking::Error, invokeDoneHandler(), Tasking::RuntimeContainer::isStarting(), Tasking::RuntimeIteration::m_container, Tasking::RuntimeContainer::m_parentTask, m_runtimeRoot, Tasking::RuntimeContainer::parentIteration(), QT_CHECK, startChildren(), Tasking::StopWithSuccess, Tasking::Success, and Tasking::RuntimeContainer::updateSuccessBit().

Referenced by childDone(), and start().

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

◆ effectiveLoopCount()

static int Tasking::TaskTreePrivate::effectiveLoopCount ( const std::optional< Loop > & loop)
inlinestatic

Definition at line 1658 of file tasktree.cpp.

Referenced by Tasking::RuntimeContainer::progressiveLoopCount().

+ Here is the caller graph for this function:

◆ emitDone()

void Tasking::TaskTreePrivate::emitDone ( DoneWith result)

Definition at line 1869 of file tasktree.cpp.

References emit, m_guard, m_progressValue, m_root, and QT_CHECK.

Referenced by continueStart(), and stop().

+ Here is the caller graph for this function:

◆ invokeDoneHandler() [1/2]

bool Tasking::TaskTreePrivate::invokeDoneHandler ( RuntimeContainer * container,
DoneWith doneWith )

◆ invokeDoneHandler() [2/2]

bool Tasking::TaskTreePrivate::invokeDoneHandler ( RuntimeTask * node,
DoneWith doneWith )

Definition at line 2193 of file tasktree.cpp.

References advanceProgress(), invokeHandler(), Tasking::GroupItem::TaskHandler::m_callDoneIf, Tasking::GroupItem::TaskHandler::m_doneHandler, Tasking::RuntimeIteration::m_isProgressive, Tasking::RuntimeTask::m_parentIteration, Tasking::RuntimeTask::m_task, Tasking::TaskNode::m_taskHandler, Tasking::RuntimeTask::m_taskNode, Tasking::shouldCall(), Tasking::Success, and Tasking::toDoneResult().

Referenced by continueStart(), and stop().

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

◆ invokeHandler()

template<typename Container , typename Handler , typename ... Args, typename ReturnType = std::invoke_result_t<Handler, Args...>>
ReturnType Tasking::TaskTreePrivate::invokeHandler ( Container * container,
Handler && handler,
Args &&... args )
inline

Definition at line 1651 of file tasktree.cpp.

References args, and m_guard.

Referenced by invokeDoneHandler(), invokeDoneHandler(), invokeLoopHandler(), start(), and start().

+ Here is the caller graph for this function:

◆ invokeLoopHandler()

bool Tasking::TaskTreePrivate::invokeLoopHandler ( RuntimeContainer * container)

Definition at line 2125 of file tasktree.cpp.

References invokeHandler(), Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeContainer::m_iterationCount, Tasking::ContainerNode::m_loop, and Tasking::RuntimeContainer::m_shouldIterate.

Referenced by start(), and startChildren().

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

◆ start() [1/3]

void Tasking::TaskTreePrivate::start ( )

Definition at line 1817 of file tasktree.cpp.

References bumpAsyncCount(), emit, it, m_asyncCount, m_guard, m_progressValue, m_root, m_runtimeRoot, m_storageHandlers, m_storages, QT_ASSERT, qWarning, and start().

Referenced by start(), Tasking::TaskTree::start(), start(), and startChildren().

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

◆ start() [2/3]

SetupResult Tasking::TaskTreePrivate::start ( RuntimeContainer * container)

Definition at line 1964 of file tasktree.cpp.

References advanceProgress(), Tasking::Continue, continueStart(), invokeHandler(), invokeLoopHandler(), Tasking::isProgressive(), Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeContainer::m_successBit, Tasking::StopWithSuccess, and Tasking::toSetupResult().

+ Here is the call graph for this function:

◆ start() [3/3]

◆ startChildren()

SetupResult Tasking::TaskTreePrivate::startChildren ( RuntimeContainer * container)

Definition at line 2010 of file tasktree.cpp.

References childDone(), Tasking::Continue, Tasking::RuntimeContainer::deleteFinishedIterations(), invokeLoopHandler(), Tasking::RuntimeIteration::m_children, Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeContainer::m_iterationCount, Tasking::RuntimeContainer::m_iterations, Tasking::RuntimeContainer::m_nextToStart, Tasking::RuntimeContainer::m_runningChildren, Tasking::RuntimeContainer::m_shouldIterate, Tasking::RuntimeContainer::m_startGuard, Tasking::RuntimeContainer::m_successBit, start(), Tasking::StopWithSuccess, and Tasking::toSetupResult().

Referenced by continueStart().

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

◆ stop() [1/3]

void Tasking::TaskTreePrivate::stop ( )

Definition at line 1839 of file tasktree.cpp.

References Tasking::Cancel, emitDone(), m_root, m_runtimeRoot, QT_ASSERT, and stop().

Referenced by Tasking::TaskTree::cancel(), childDone(), stop(), stop(), and stop().

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

◆ stop() [2/3]

void Tasking::TaskTreePrivate::stop ( RuntimeContainer * container)

Definition at line 2083 of file tasktree.cpp.

References advanceProgress(), child, i, Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeContainer::m_iterationCount, Tasking::RuntimeContainer::m_iterations, Tasking::ContainerNode::m_taskCount, Tasking::RuntimeContainer::progressiveLoopCount(), and stop().

+ Here is the call graph for this function:

◆ stop() [3/3]

void Tasking::TaskTreePrivate::stop ( RuntimeTask * node)

Definition at line 2178 of file tasktree.cpp.

References Tasking::Cancel, invokeDoneHandler(), Tasking::RuntimeTask::m_container, Tasking::RuntimeTask::m_task, and stop().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_asyncCount

int Tasking::TaskTreePrivate::m_asyncCount = 0

Definition at line 1666 of file tasktree.cpp.

Referenced by Tasking::TaskTree::asyncCount(), bumpAsyncCount(), and start().

◆ m_guard

◆ m_progressValue

int Tasking::TaskTreePrivate::m_progressValue = 0

Definition at line 1665 of file tasktree.cpp.

Referenced by advanceProgress(), emitDone(), Tasking::TaskTree::progressValue(), and start().

◆ m_root

std::optional<TaskNode> Tasking::TaskTreePrivate::m_root

◆ m_runtimeRoot

std::unique_ptr<RuntimeTask> Tasking::TaskTreePrivate::m_runtimeRoot

◆ m_storageHandlers

QHash<StorageBase, StorageHandler> Tasking::TaskTreePrivate::m_storageHandlers

Definition at line 1668 of file tasktree.cpp.

Referenced by callStorageHandler(), and start().

◆ m_storages

QSet<StorageBase> Tasking::TaskTreePrivate::m_storages

Definition at line 1667 of file tasktree.cpp.

Referenced by Tasking::TaskTree::setRecipe(), and start().

◆ q

TaskTree* Tasking::TaskTreePrivate::q = nullptr

Definition at line 1663 of file tasktree.cpp.

Referenced by Tasking::RuntimeTask::~RuntimeTask().


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