• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

ThreadWeaver

  • ThreadWeaver
  • JobCollection
Public Slots | Public Member Functions | Protected Member Functions | List of all members
ThreadWeaver::JobCollection Class Reference

#include <JobCollection.h>

Inheritance diagram for ThreadWeaver::JobCollection:
Inheritance graph
[legend]

Public Slots

void stop (ThreadWeaver::Job *job)
 

Public Member Functions

 JobCollection (QObject *parent=0)
 
 ~JobCollection ()
 
virtual void addJob (Job *)
 
bool canBeExecuted ()
 
- Public Member Functions inherited from ThreadWeaver::Job
 Job (QObject *parent=0)
 
virtual ~Job ()
 
void assignQueuePolicy (QueuePolicy *)
 
bool isFinished () const
 
virtual int priority () const
 
void removeQueuePolicy (QueuePolicy *)
 
virtual void requestAbort ()
 
virtual bool success () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Protected Member Functions

void aboutToBeDequeued (WeaverInterface *weaver)
 
void aboutToBeQueued (WeaverInterface *weaver)
 
void finalCleanup ()
 
virtual void internalJobDone (Job *)
 
Job * jobAt (int i)
 
const int jobListLength ()
 
- Protected Member Functions inherited from ThreadWeaver::Job
void freeQueuePolicyResources ()
 
void setFinished (bool status)
 
Thread * thread ()
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Signals inherited from ThreadWeaver::Job
void done (ThreadWeaver::Job *)
 
void failed (ThreadWeaver::Job *)
 
void started (ThreadWeaver::Job *)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Protected Attributes inherited from ThreadWeaver::Job
Private * d
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A JobCollection is a vector of Jobs that will be queued together.

In a JobCollection, the order of execution of the elements is not guaranteed.

It is intended that the collection is set up first and then queued. After queuing, no further jobs should be added to the collection.

JobCollection emits a done(Job*) signal when all of the jobs in the collection have completed.

Definition at line 49 of file JobCollection.h.

Constructor & Destructor Documentation

JobCollection::JobCollection ( QObject *  parent = 0)
explicit

Definition at line 131 of file JobCollection.cpp.

JobCollection::~JobCollection ( )

Definition at line 137 of file JobCollection.cpp.

Member Function Documentation

void JobCollection::aboutToBeDequeued ( WeaverInterface *  weaver)
protectedvirtual

Overload to dequeue the collection.

Reimplemented from ThreadWeaver::Job.

Definition at line 181 of file JobCollection.cpp.

void JobCollection::aboutToBeQueued ( WeaverInterface *  weaver)
protectedvirtual

Overload to queue the collection.

Reimplemented from ThreadWeaver::Job.

Reimplemented in ThreadWeaver::JobSequence.

Definition at line 167 of file JobCollection.cpp.

void JobCollection::addJob ( Job *  job)
virtual

Append a job to the collection.

To use JobCollection, create the Job objects first, add them to the collection, and then queue it. After the collection has been queued, no further Jobs are supposed to be added.

Definition at line 145 of file JobCollection.cpp.

bool JobCollection::canBeExecuted ( )
virtual

Overload to manage recursive sets.

Reimplemented from ThreadWeaver::Job.

Definition at line 252 of file JobCollection.cpp.

void JobCollection::finalCleanup ( )
protected

Perform the task usually done when one individual job is finished, but in our case only when the whole collection is finished or partly dequeued.

Definition at line 308 of file JobCollection.cpp.

void JobCollection::internalJobDone ( Job *  job)
protectedvirtual

Callback method for done jobs.

Reimplemented in ThreadWeaver::JobSequence.

Definition at line 302 of file JobCollection.cpp.

Job * JobCollection::jobAt ( int  i)
protected

Return a reference to the job in the job list at position i.

Definition at line 239 of file JobCollection.cpp.

const int JobCollection::jobListLength ( )
protected

Return the number of jobs in the joblist.

Definition at line 246 of file JobCollection.cpp.

void JobCollection::stop ( ThreadWeaver::Job *  job)
slot

Stop processing, dequeue all remaining Jobs.

job is supposed to be an element of the collection.

Definition at line 155 of file JobCollection.cpp.


The documentation for this class was generated from the following files:
  • JobCollection.h
  • JobCollection.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ThreadWeaver

Skip menu "ThreadWeaver"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal