LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
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::result_of_t< F(WorkerType *, Args...)> > ScheduleImpl (F f, Args &&... args)
 
template<typename F >
QFuture< std::result_of_t< F()> > ScheduleImpl (F func)
 
template<typename F , typename... Args>
QFuture< std::result_of_t< F(Args...)> > ScheduleImpl (F f, Args &&... args)
 
- Public Member Functions inherited from LC::Util::WorkerThreadBase
void SetPaused (bool)
 
template<typename F >
QFuture< std::result_of_t< F()> > ScheduleImpl (F func)
 
template<typename F , typename... Args>
QFuture< std::result_of_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 119 of file workerthreadbase.h.

Member Typedef Documentation

◆ W

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

Definition at line 124 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 130 of file workerthreadbase.h.

◆ WorkerThread() [2/3]

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

Definition at line 137 of file workerthreadbase.h.

◆ 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 150 of file workerthreadbase.h.

◆ ~WorkerThread()

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

Definition at line 155 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 194 of file workerthreadbase.h.

◆ Initialize()

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

Implements LC::Util::WorkerThreadBase.

Definition at line 187 of file workerthreadbase.h.

◆ ScheduleImpl() [1/3]

template<typename WorkerType >
template<typename F , typename... Args>
QFuture<std::result_of_t<F (Args...)> > LC::Util::WorkerThreadBase::ScheduleImpl ( typename F  ,
typename...  Args 
)
inline

Definition at line 71 of file workerthreadbase.h.

◆ ScheduleImpl() [2/3]

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

Definition at line 181 of file workerthreadbase.h.

◆ ScheduleImpl() [3/3]

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

Definition at line 50 of file workerthreadbase.h.

◆ SetAutoQuit()

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

Definition at line 168 of file workerthreadbase.h.

◆ SetQuitWait()

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

Definition at line 173 of file workerthreadbase.h.

References LC::Util::oral::sph::f, and LC::Util::WorkerThreadBase::ScheduleImpl().

+ Here is the call graph for this function:

Member Data Documentation

◆ Initializer_

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

Definition at line 128 of file workerthreadbase.h.

◆ Worker_

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

Definition at line 126 of file workerthreadbase.h.


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