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
Tasking::TaskTreePrivate Class Reference
Collaboration diagram for Tasking::TaskTreePrivate:

Classes

struct  StorageHandler

Public Types

typedef StorageBase::StorageHandler StorageHandler::* HandlerPtr
typedef StorageBase::StorageHandler StorageHandler::* HandlerPtr

Public Member Functions

 TaskTreePrivate (TaskTree *taskTree)
 ~TaskTreePrivate ()
void start ()
void stop ()
void bumpAsyncCount ()
void advanceProgress (int byValue)
void emitDone (DoneWith result)
void callSetupHandler (const StorageBase &storage, StoragePtr storagePtr)
void callDoneHandler (const StorageBase &storage, StoragePtr storagePtr)
void callStorageHandler (const StorageBase &storage, StoragePtr storagePtr, HandlerPtr ptr)
void startTask (const std::shared_ptr< RuntimeTask > &node)
void stopTask (RuntimeTask *node)
bool invokeTaskDoneHandler (RuntimeTask *node, DoneWith doneWith)
void continueContainer (RuntimeContainer *container)
void startChildren (RuntimeContainer *container)
void childDone (RuntimeIteration *iteration, bool success)
void stopContainer (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)
 TaskTreePrivate (TaskTree *taskTree)
 ~TaskTreePrivate ()
void start ()
void stop ()
void bumpAsyncCount ()
void advanceProgress (int byValue)
void emitDone (DoneWith result)
void callSetupHandler (const StorageBase &storage, StoragePtr storagePtr)
void callDoneHandler (const StorageBase &storage, StoragePtr storagePtr)
void callStorageHandler (const StorageBase &storage, StoragePtr storagePtr, HandlerPtr ptr)
void startTask (const std::shared_ptr< RuntimeTask > &node)
void stopTask (RuntimeTask *node)
bool invokeTaskDoneHandler (RuntimeTask *node, DoneWith doneWith)
void continueContainer (RuntimeContainer *container)
void startChildren (RuntimeContainer *container)
void childDone (RuntimeIteration *iteration, bool success)
void stopContainer (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)
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::shared_ptr< RuntimeTaskm_runtimeRoot

Detailed Description

Definition at line 1859 of file tasktree.cpp.

Member Typedef Documentation

◆ HandlerPtr [1/2]

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

Definition at line 1882 of file tasktree.cpp.

◆ HandlerPtr [2/2]

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

Definition at line 1882 of file tasktree.cpp.

Constructor & Destructor Documentation

◆ TaskTreePrivate() [1/2]

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

Definition at line 2051 of file tasktree.cpp.

References q.

◆ ~TaskTreePrivate() [1/2]

Tasking::TaskTreePrivate::~TaskTreePrivate ( )
default

◆ TaskTreePrivate() [2/2]

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

◆ ~TaskTreePrivate() [2/2]

Tasking::TaskTreePrivate::~TaskTreePrivate ( )

Member Function Documentation

◆ advanceProgress() [1/2]

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

Definition at line 2139 of file tasktree.cpp.

References m_progressValue.

Referenced by invokeTaskDoneHandler(), startChildren(), startTask(), and stopContainer().

Here is the caller graph for this function:

◆ advanceProgress() [2/2]

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

◆ bumpAsyncCount() [1/2]

void Tasking::TaskTreePrivate::bumpAsyncCount ( )

Definition at line 2130 of file tasktree.cpp.

References m_asyncCount.

Referenced by start().

Here is the caller graph for this function:

◆ bumpAsyncCount() [2/2]

void Tasking::TaskTreePrivate::bumpAsyncCount ( )

◆ callDoneHandler() [1/2]

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

Definition at line 1875 of file tasktree.cpp.

References callStorageHandler().

Here is the call graph for this function:

◆ callDoneHandler() [2/2]

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

Definition at line 1875 of file tasktree.cpp.

◆ callSetupHandler() [1/2]

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

Definition at line 1872 of file tasktree.cpp.

References callStorageHandler().

Here is the call graph for this function:

◆ callSetupHandler() [2/2]

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

Definition at line 1872 of file tasktree.cpp.

◆ callStorageHandler() [1/2]

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

Definition at line 1883 of file tasktree.cpp.

Referenced by callDoneHandler(), and callSetupHandler().

Here is the caller graph for this function:

◆ callStorageHandler() [2/2]

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

Definition at line 1883 of file tasktree.cpp.

◆ childDone() [1/2]

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

Definition at line 2325 of file tasktree.cpp.

References Tasking::Continue, continueContainer(), Tasking::RuntimeContainer::isStarting(), Tasking::RuntimeIteration::m_container, Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeIteration::m_doneCount, Tasking::RuntimeContainer::m_parentTask, Tasking::RuntimeContainer::m_runningChildren, Tasking::RuntimeTask::m_setupResult, Tasking::ContainerNode::m_workflowPolicy, stopContainer(), Tasking::StopOnError, Tasking::StopOnSuccess, Tasking::StopOnSuccessOrError, Tasking::toSetupResult(), and Tasking::RuntimeContainer::updateSuccessBit().

Referenced by continueContainer(), and startChildren().

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

◆ childDone() [2/2]

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

◆ continueContainer() [1/2]

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

Definition at line 2245 of file tasktree.cpp.

References childDone(), Tasking::Continue, emitDone(), Tasking::Error, invokeDoneHandler(), Tasking::RuntimeContainer::isStarting(), Tasking::RuntimeIteration::m_container, Tasking::RuntimeContainer::m_parentTask, Tasking::RuntimeTask::m_setupResult, Tasking::RuntimeContainer::parentIteration(), Tasking::RuntimeIteration::removeChild(), startChildren(), Tasking::StopWithSuccess, Tasking::Success, Tasking::toSetupResult(), and Tasking::RuntimeContainer::updateSuccessBit().

Referenced by childDone(), and startTask().

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

◆ continueContainer() [2/2]

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

◆ effectiveLoopCount() [1/2]

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

Definition at line 1931 of file tasktree.cpp.

◆ effectiveLoopCount() [2/2]

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

Definition at line 1931 of file tasktree.cpp.

◆ emitDone() [1/2]

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

Definition at line 2150 of file tasktree.cpp.

Referenced by continueContainer(), and stop().

Here is the caller graph for this function:

◆ emitDone() [2/2]

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

◆ invokeDoneHandler() [1/2]

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

Definition at line 2374 of file tasktree.cpp.

References Tasking::GroupItem::GroupHandler::m_callDoneIf, Tasking::RuntimeContainer::m_callStorageDoneHandlersOnDestruction, Tasking::RuntimeContainer::m_containerNode, Tasking::shouldCall(), Tasking::Success, and Tasking::toDoneResult().

Referenced by continueContainer(), and stopTask().

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

◆ invokeDoneHandler() [2/2]

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

◆ invokeHandler() [1/2]

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 1914 of file tasktree.cpp.

◆ invokeHandler() [2/2]

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 1914 of file tasktree.cpp.

◆ invokeLoopHandler() [1/2]

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

Definition at line 2384 of file tasktree.cpp.

References Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeContainer::m_iterationCount, and Tasking::RuntimeContainer::m_shouldIterate.

Referenced by startChildren().

Here is the caller graph for this function:

◆ invokeLoopHandler() [2/2]

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

◆ invokeTaskDoneHandler() [1/2]

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

Definition at line 2460 of file tasktree.cpp.

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

Referenced by stopTask().

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

◆ invokeTaskDoneHandler() [2/2]

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

◆ start() [1/2]

void Tasking::TaskTreePrivate::start ( )

Definition at line 2098 of file tasktree.cpp.

References bumpAsyncCount(), m_asyncCount, and m_progressValue.

Referenced by Tasking::TaskTree::start().

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

◆ start() [2/2]

void Tasking::TaskTreePrivate::start ( )

◆ startChildren() [1/2]

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

◆ startChildren() [2/2]

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

◆ startTask() [1/2]

void Tasking::TaskTreePrivate::startTask ( const std::shared_ptr< RuntimeTask > & node)

Definition at line 2398 of file tasktree.cpp.

References advanceProgress(), Tasking::Continue, continueContainer(), Tasking::isProgressive(), Tasking::RuntimeContainer::m_parentTask, Tasking::RuntimeTask::m_setupResult, Tasking::RuntimeContainer::m_successBit, Tasking::ContainerNode::m_taskCount, and Tasking::StopWithSuccess.

Referenced by startChildren().

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

◆ startTask() [2/2]

void Tasking::TaskTreePrivate::startTask ( const std::shared_ptr< RuntimeTask > & node)

◆ stop() [1/2]

void Tasking::TaskTreePrivate::stop ( )

Definition at line 2120 of file tasktree.cpp.

References Tasking::Cancel, and emitDone().

Referenced by Tasking::TaskTree::cancel().

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

◆ stop() [2/2]

void Tasking::TaskTreePrivate::stop ( )

◆ stopContainer() [1/2]

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

Definition at line 2344 of file tasktree.cpp.

References advanceProgress(), Tasking::RuntimeContainer::m_containerNode, Tasking::RuntimeContainer::m_iterationCount, Tasking::ContainerNode::m_taskCount, and Tasking::RuntimeContainer::progressiveLoopCount().

Referenced by childDone(), and stopTask().

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

◆ stopContainer() [2/2]

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

◆ stopTask() [1/2]

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

Definition at line 2445 of file tasktree.cpp.

References Tasking::Cancel, invokeDoneHandler(), invokeTaskDoneHandler(), and stopContainer().

Here is the call graph for this function:

◆ stopTask() [2/2]

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

Member Data Documentation

◆ m_asyncCount

int Tasking::TaskTreePrivate::m_asyncCount = 0

Definition at line 1939 of file tasktree.cpp.

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

◆ m_guard

Guard Tasking::TaskTreePrivate::m_guard

Definition at line 1937 of file tasktree.cpp.

◆ m_progressValue

int Tasking::TaskTreePrivate::m_progressValue = 0

Definition at line 1938 of file tasktree.cpp.

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

◆ m_root

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

Definition at line 1942 of file tasktree.cpp.

◆ m_runtimeRoot

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

Definition at line 1943 of file tasktree.cpp.

◆ m_storageHandlers

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

Definition at line 1941 of file tasktree.cpp.

◆ m_storages

QSet< StorageBase > Tasking::TaskTreePrivate::m_storages

Definition at line 1940 of file tasktree.cpp.

◆ q

TaskTree * Tasking::TaskTreePrivate::q = nullptr

Definition at line 1936 of file tasktree.cpp.

Referenced by TaskTreePrivate().


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