LeechCraft  0.6.70-9312-g4cc613a2df
Modular cross-platform feature rich live environment.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
LeechCraft::Util::WorkerThread< WorkerType > Singleton 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)
 
- 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 () overridefinal
 

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>
singleton LeechCraft::Util::WorkerThread< WorkerType >

Definition at line 135 of file workerthreadbase.h.

Member Typedef Documentation

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

Definition at line 139 of file workerthreadbase.h.

Constructor & Destructor Documentation

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

Definition at line 145 of file workerthreadbase.h.

References LeechCraft::Util::parent.

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

Definition at line 152 of file workerthreadbase.h.

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

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

Definition at line 170 of file workerthreadbase.h.

Member Function Documentation

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

Implements LeechCraft::Util::WorkerThreadBase.

Definition at line 204 of file workerthreadbase.h.

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

Implements LeechCraft::Util::WorkerThreadBase.

Definition at line 197 of file workerthreadbase.h.

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

Definition at line 191 of file workerthreadbase.h.

References LeechCraft::Util::Invoke(), and LeechCraft::Util::WorkerThreadBase::ScheduleImpl().

+ Here is the call graph for this function:

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

Definition at line 185 of file workerthreadbase.h.

Member Data Documentation

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

Definition at line 143 of file workerthreadbase.h.

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

Definition at line 141 of file workerthreadbase.h.


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