JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
IWorkerThread< IQueueStruct, OQueueStruct, WConfig > Class Template Referenceabstract

#include <IOThreadPool.h>

Inheritance diagram for IWorkerThread< IQueueStruct, OQueueStruct, WConfig >:
[legend]

Public Types

typedef IQueueStruct::queue_t IQueue
 
typedef OQueueStruct::queue_t OQueue
 
typedef IQueueStruct::payload_t IPayload
 
typedef OQueueStruct::payload_t OPayload
 
typedef WConfig WConf
 

Public Member Functions

 IWorkerThread (IQueue *iqueue, OQueue *oqueue, const WConf &conf)
 
 IWorkerThread (IQueue *iqueue, OQueue *oqueue, WConf &&conf)
 
 IWorkerThread (IWorkerThread &&)=default
 
IWorkerThreadoperator= (IWorkerThread &&)=default
 
 IWorkerThread (const IWorkerThread &)=delete
 
IWorkerThreadoperator= (const IWorkerThread &)=delete
 
virtual ~IWorkerThread ()
 
void start ()
 
void waitFor ()
 
void stop ()
 
bool requestedToStop () const
 
bool isRunning () const
 

Static Public Member Functions

static constexpr auto getIQueueFlags ()
 
static constexpr auto getOQueueFlags ()
 
static const size_t recommendedThreads ()
 

Protected Member Functions

virtual void work ()=0
 

Protected Attributes

IQueueiqueue
 
OQueueoqueue
 
WConf conf
 
bool shouldRun = true
 

Detailed Description

template<class IQueueStruct, class OQueueStruct, class WConfig>
class IWorkerThread< IQueueStruct, OQueueStruct, WConfig >

Interface for workers that can be used with the IOThreadPool

Member Typedef Documentation

◆ IPayload

template<class IQueueStruct , class OQueueStruct , class WConfig >
typedef IQueueStruct::payload_t IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::IPayload

◆ IQueue

template<class IQueueStruct , class OQueueStruct , class WConfig >
typedef IQueueStruct::queue_t IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::IQueue

◆ OPayload

template<class IQueueStruct , class OQueueStruct , class WConfig >
typedef OQueueStruct::payload_t IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::OPayload

◆ OQueue

template<class IQueueStruct , class OQueueStruct , class WConfig >
typedef OQueueStruct::queue_t IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::OQueue

◆ WConf

template<class IQueueStruct , class OQueueStruct , class WConfig >
typedef WConfig IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::WConf

Constructor & Destructor Documentation

◆ IWorkerThread() [1/4]

template<class IQueueStruct , class OQueueStruct , class WConfig >
IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::IWorkerThread ( IQueue iqueue,
OQueue oqueue,
const WConf conf 
)
inline

◆ IWorkerThread() [2/4]

template<class IQueueStruct , class OQueueStruct , class WConfig >
IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::IWorkerThread ( IQueue iqueue,
OQueue oqueue,
WConf &&  conf 
)
inline

◆ IWorkerThread() [3/4]

template<class IQueueStruct , class OQueueStruct , class WConfig >
IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::IWorkerThread ( IWorkerThread< IQueueStruct, OQueueStruct, WConfig > &&  )
default

◆ IWorkerThread() [4/4]

template<class IQueueStruct , class OQueueStruct , class WConfig >
IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::IWorkerThread ( const IWorkerThread< IQueueStruct, OQueueStruct, WConfig > &  )
delete

◆ ~IWorkerThread()

template<class IQueueStruct , class OQueueStruct , class WConfig >
virtual IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::~IWorkerThread ( )
inlinevirtual

Member Function Documentation

◆ getIQueueFlags()

template<class IQueueStruct , class OQueueStruct , class WConfig >
static constexpr auto IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::getIQueueFlags ( )
inlinestaticconstexpr

◆ getOQueueFlags()

template<class IQueueStruct , class OQueueStruct , class WConfig >
static constexpr auto IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::getOQueueFlags ( )
inlinestaticconstexpr

◆ isRunning()

template<class IQueueStruct , class OQueueStruct , class WConfig >
bool IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::isRunning ( ) const
inline

◆ operator=() [1/2]

template<class IQueueStruct , class OQueueStruct , class WConfig >
IWorkerThread& IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::operator= ( const IWorkerThread< IQueueStruct, OQueueStruct, WConfig > &  )
delete

◆ operator=() [2/2]

template<class IQueueStruct , class OQueueStruct , class WConfig >
IWorkerThread& IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::operator= ( IWorkerThread< IQueueStruct, OQueueStruct, WConfig > &&  )
default

◆ recommendedThreads()

template<class IQueueStruct , class OQueueStruct , class WConfig >
static const size_t IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::recommendedThreads ( )
inlinestatic

◆ requestedToStop()

template<class IQueueStruct , class OQueueStruct , class WConfig >
bool IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::requestedToStop ( ) const
inline

◆ start()

template<class IQueueStruct , class OQueueStruct , class WConfig >
void IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::start ( )
inline

◆ stop()

template<class IQueueStruct , class OQueueStruct , class WConfig >
void IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::stop ( )
inline

◆ waitFor()

template<class IQueueStruct , class OQueueStruct , class WConfig >
void IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::waitFor ( )
inline

◆ work()

template<class IQueueStruct , class OQueueStruct , class WConfig >
virtual void IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::work ( )
protectedpure virtual

Field Documentation

◆ conf

template<class IQueueStruct , class OQueueStruct , class WConfig >
WConf IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::conf
protected

◆ iqueue

template<class IQueueStruct , class OQueueStruct , class WConfig >
IQueue* IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::iqueue
protected

◆ oqueue

template<class IQueueStruct , class OQueueStruct , class WConfig >
OQueue* IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::oqueue
protected

◆ shouldRun

template<class IQueueStruct , class OQueueStruct , class WConfig >
bool IWorkerThread< IQueueStruct, OQueueStruct, WConfig >::shouldRun = true
protected

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