ThreadWeaver::State

Search for usage in LXR

ThreadWeaver::State Class Referenceabstract

#include <state.h>

Inheritance diagram for ThreadWeaver::State:

Public Member Functions

 State (QueueSignals *weaver)
 
 ~State () override
 
virtual void activated ()
 
virtual StateId stateId () const =0
 
QString stateName () const
 
- Public Member Functions inherited from ThreadWeaver::QueueInterface
virtual int currentNumberOfThreads () const =0
 
virtual void dequeue ()=0
 
virtual bool dequeue (const JobPointer &job)=0
 
virtual void enqueue (const QList< JobPointer > &jobs)=0
 
virtual void finish ()=0
 
virtual bool isEmpty () const =0
 
virtual bool isIdle () const =0
 
virtual int maximumNumberOfThreads () const =0
 
virtual int queueLength () const =0
 
virtual void requestAbort ()=0
 
virtual void reschedule ()=0
 
virtual void resume ()=0
 
virtual void setMaximumNumberOfThreads (int cap)=0
 
virtual void shutDown ()=0
 
virtual const Statestate () const =0
 
virtual void suspend ()=0
 

Protected Member Functions

virtual QueueInterfaceweaver ()
 
virtual const QueueInterfaceweaver () const
 

Detailed Description

We use a State pattern to handle the system state in ThreadWeaver.

Definition at line 55 of file state.h.

Constructor & Destructor Documentation

◆ State()

State::State ( QueueSignals * weaver)
explicit

Default constructor.

Definition at line 30 of file state.cpp.

◆ ~State()

State::~State ( )
override

Destructor.

Definition at line 35 of file state.cpp.

Member Function Documentation

◆ activated()

void State::activated ( )
virtual

The state has been changed so that this object is responsible for state handling.

Reimplemented in ThreadWeaver::SuspendingState.

Definition at line 45 of file state.cpp.

◆ stateId()

virtual StateId ThreadWeaver::State::stateId ( ) const
pure virtual

◆ stateName()

QString State::stateName ( ) const

The ID of the current state.

See also
StateNames, StateID

Definition at line 40 of file state.cpp.

◆ weaver() [1/2]

QueueInterface * State::weaver ( )
protectedvirtual

The Weaver interface this state handles.

Reimplemented in ThreadWeaver::DestructedState, and ThreadWeaver::WeaverImplState.

Definition at line 49 of file state.cpp.

◆ weaver() [2/2]

const QueueInterface * State::weaver ( ) const
protectedvirtual

Definition at line 54 of file state.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:06:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.