LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
LeechCraft::Util::WorkerThread< WorkerType > Class Template Reference

#include "workerthreadbase.h"

+ Inheritance diagram for LeechCraft::Util::WorkerThread< WorkerType >:
+ Collaboration diagram for LeechCraft::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)
 
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 LeechCraft::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 LeechCraft::Util::WorkerThreadBase
void run () override final
 

Protected Attributes

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

Additional Inherited Members

- Signals inherited from LeechCraft::Util::WorkerThreadBase
void rotateFuncs ()
 

Detailed Description

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

Definition at line 136 of file workerthreadbase.h.

Member Typedef Documentation

◆ W

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

Definition at line 140 of file workerthreadbase.h.

Constructor & Destructor Documentation

◆ WorkerThread() [1/3]

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

Definition at line 146 of file workerthreadbase.h.

◆ WorkerThread() [2/3]

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

Definition at line 153 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 >>
LeechCraft::Util::WorkerThread< WorkerType >::WorkerThread ( const Head head,
const Rest &...  rest 
)
inline

Definition at line 166 of file workerthreadbase.h.

◆ ~WorkerThread()

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

Definition at line 171 of file workerthreadbase.h.

Member Function Documentation

◆ Cleanup()

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

Implements LeechCraft::Util::WorkerThreadBase.

Definition at line 205 of file workerthreadbase.h.

◆ Initialize()

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

Implements LeechCraft::Util::WorkerThreadBase.

Definition at line 198 of file workerthreadbase.h.

◆ ScheduleImpl() [1/3]

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

Definition at line 61 of file workerthreadbase.h.

◆ ScheduleImpl() [2/3]

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

Definition at line 82 of file workerthreadbase.h.

◆ ScheduleImpl() [3/3]

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

Definition at line 192 of file workerthreadbase.h.

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

+ Here is the call graph for this function:

◆ SetAutoQuit()

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

Definition at line 186 of file workerthreadbase.h.

Member Data Documentation

◆ Initializer_

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

Definition at line 144 of file workerthreadbase.h.

◆ Worker_

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

Definition at line 142 of file workerthreadbase.h.


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