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

#include "workerthreadbase.h"

+ Inheritance diagram for LC::Util::WorkerThread< typename >:
+ Collaboration diagram for LC::Util::WorkerThread< typename >:

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)
 
- 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>
class LC::Util::WorkerThread< typename >

Definition at line 14 of file workerthreadbasefwd.h.

Member Typedef Documentation

◆ W

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

Definition at line 118 of file workerthreadbase.h.

Constructor & Destructor Documentation

◆ WorkerThread() [1/3]

template<typename>
LC::Util::WorkerThread< typename >::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>
template<typename... Args>
LC::Util::WorkerThread< typename >::WorkerThread ( QObject * parent,
const Args &... args )
inline

Definition at line 131 of file workerthreadbase.h.

References Initializer_.

◆ WorkerThread() [3/3]

template<typename>
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< typename >::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>
LC::Util::WorkerThread< typename >::~WorkerThread ( )
inline

Definition at line 149 of file workerthreadbase.h.

Member Function Documentation

◆ Cleanup()

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

Implements LC::Util::WorkerThreadBase.

Definition at line 188 of file workerthreadbase.h.

References Worker_.

◆ Initialize()

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

Implements LC::Util::WorkerThreadBase.

Definition at line 181 of file workerthreadbase.h.

References Initializer_, and Worker_.

◆ ScheduleImpl() [1/2]

template<typename>
template<typename F, typename... Args>
QFuture< std::result_of_t< F(WorkerType *, Args...)> > LC::Util::WorkerThread< typename >::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>
template<typename F>
QFuture< std::result_of_t< F()> > LC::Util::WorkerThreadBase::ScheduleImpl ( F func)
inline

Definition at line 38 of file workerthreadbase.h.

◆ SetAutoQuit()

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

Definition at line 162 of file workerthreadbase.h.

◆ SetQuitWait()

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

Definition at line 167 of file workerthreadbase.h.

Member Data Documentation

◆ Initializer_

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

Definition at line 122 of file workerthreadbase.h.

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

◆ Worker_

template<typename>
std::unique_ptr<WorkerType> LC::Util::WorkerThread< typename >::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 files: