LeechCraft 0.6.70-17609-g3dde4097dd
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util::WorkerThread< WorkerType > Class Template Reference

#include "workerthreadbase.h"

Inheritance diagram for LC::Util::WorkerThread< WorkerType >:
Collaboration diagram for LC::Util::WorkerThread< WorkerType >:

Public Member Functions

 WorkerThread (QObject *parent=nullptr)
template<typename... Args>
 WorkerThread (QObject *parent, const Args &... args)
template<typename Head, typename... Rest, typename = std::enable_if_t< !std::is_base_of<QObject, std::remove_pointer_t<std::decay_t<Head>>>::value >>
 WorkerThread (const Head &head, const Rest &... rest)
 ~WorkerThread ()
void SetAutoQuit (bool autoQuit)
void SetQuitWait (unsigned long wait)
template<typename F, typename... Args>
QFuture< std::invoke_result_t< F, WorkerType *, Args... > > ScheduleImpl (F f, Args &&... args)
template<typename F>
QFuture< std::invoke_result_t< F > > ScheduleImpl (F func)
Public Member Functions inherited from LC::Util::WorkerThreadBase
void SetPaused (bool)
template<typename F>
QFuture< std::invoke_result_t< F > > ScheduleImpl (F func)
template<typename F, typename... Args>
QFuture< std::invoke_result_t< F, Args... > > ScheduleImpl (F f, Args &&... args)
virtual size_t GetQueueSize ()

Protected Types

using W = WorkerType

Protected Member Functions

void Initialize () override
void Cleanup () override
Protected Member Functions inherited from LC::Util::WorkerThreadBase
void run () final

Protected Attributes

std::unique_ptr< WorkerType > Worker_
std::unique_ptr< detail::InitializerBase< WorkerType > > Initializer_

Additional Inherited Members

Signals inherited from LC::Util::WorkerThreadBase
void rotateFuncs ()

Detailed Description

template<typename WorkerType>
class LC::Util::WorkerThread< WorkerType >

Definition at line 113 of file workerthreadbase.h.

Member Typedef Documentation

◆ W

template<typename WorkerType>
using LC::Util::WorkerThread< WorkerType >::W = WorkerType
protected

Definition at line 118 of file workerthreadbase.h.

Constructor & Destructor Documentation

◆ WorkerThread() [1/3]

template<typename WorkerType>
LC::Util::WorkerThread< WorkerType >::WorkerThread ( QObject * parent = nullptr)
inline

Definition at line 124 of file workerthreadbase.h.

References Initializer_.

Referenced by WorkerThread().

Here is the caller graph for this function:

◆ WorkerThread() [2/3]

template<typename WorkerType>
template<typename... Args>
LC::Util::WorkerThread< WorkerType >::WorkerThread ( QObject * parent,
const Args &... args )
inline

Definition at line 131 of file workerthreadbase.h.

References Initializer_.

◆ WorkerThread() [3/3]

template<typename WorkerType>
template<typename Head, typename... Rest, typename = std::enable_if_t< !std::is_base_of<QObject, std::remove_pointer_t<std::decay_t<Head>>>::value >>
LC::Util::WorkerThread< WorkerType >::WorkerThread ( const Head & head,
const Rest &... rest )
inline

Definition at line 144 of file workerthreadbase.h.

References WorkerThread().

Here is the call graph for this function:

◆ ~WorkerThread()

template<typename WorkerType>
LC::Util::WorkerThread< WorkerType >::~WorkerThread ( )
inline

Definition at line 149 of file workerthreadbase.h.

Member Function Documentation

◆ Cleanup()

template<typename WorkerType>
void LC::Util::WorkerThread< WorkerType >::Cleanup ( )
inlineoverrideprotectedvirtual

Implements LC::Util::WorkerThreadBase.

Definition at line 188 of file workerthreadbase.h.

References Worker_.

◆ Initialize()

template<typename WorkerType>
void LC::Util::WorkerThread< WorkerType >::Initialize ( )
inlineoverrideprotectedvirtual

Implements LC::Util::WorkerThreadBase.

Definition at line 181 of file workerthreadbase.h.

References Initializer_, and Worker_.

◆ ScheduleImpl() [1/2]

template<typename WorkerType>
template<typename F, typename... Args>
QFuture< std::invoke_result_t< F, WorkerType *, Args... > > LC::Util::WorkerThread< WorkerType >::ScheduleImpl ( F f,
Args &&... args )
inline

Definition at line 175 of file workerthreadbase.h.

References LC::Util::WorkerThreadBase::ScheduleImpl(), and Worker_.

Here is the call graph for this function:

◆ ScheduleImpl() [2/2]

template<typename WorkerType>
template<typename F>
QFuture< std::invoke_result_t< F > > LC::Util::WorkerThreadBase::ScheduleImpl ( F func)
inline

Definition at line 38 of file workerthreadbase.h.

◆ SetAutoQuit()

template<typename WorkerType>
void LC::Util::WorkerThread< WorkerType >::SetAutoQuit ( bool autoQuit)
inline

Definition at line 162 of file workerthreadbase.h.

◆ SetQuitWait()

template<typename WorkerType>
void LC::Util::WorkerThread< WorkerType >::SetQuitWait ( unsigned long wait)
inline

Definition at line 167 of file workerthreadbase.h.

Member Data Documentation

◆ Initializer_

template<typename WorkerType>
std::unique_ptr<detail::InitializerBase<WorkerType> > LC::Util::WorkerThread< WorkerType >::Initializer_
protected

Definition at line 122 of file workerthreadbase.h.

Referenced by WorkerThread(), WorkerThread(), and Initialize().

◆ Worker_

template<typename WorkerType>
std::unique_ptr<WorkerType> LC::Util::WorkerThread< WorkerType >::Worker_
protected

Definition at line 120 of file workerthreadbase.h.

Referenced by Cleanup(), Initialize(), and ScheduleImpl().


The documentation for this class was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.17609.g3dde4097dd-build/leechcraft-0.6.70-17609-g3dde4097dd/src/util/threads/workerthreadbase.h