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

ThreadWeaver

ThreadWeaver::JobCollection

ThreadWeaver::JobCollection Class Reference

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

#include <JobCollection.h>

Inheritance diagram for ThreadWeaver::JobCollection:

Inheritance graph
[legend]

List of all members.


Public Slots

void stop (ThreadWeaver::Job *job)

Public Member Functions

virtual void addJob (Job *)
bool canBeExecuted ()
 JobCollection (QObject *parent=0)
 ~JobCollection ()

Protected Member Functions

void aboutToBeDequeued (WeaverInterface *weaver)
void aboutToBeQueued (WeaverInterface *weaver)
void finalCleanup ()
virtual void internalJobDone (Job *)
Job * jobAt (int i)
const int jobListLength ()

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  )  [protected, virtual]

Overload to dequeue the collection.

Reimplemented from ThreadWeaver::Job.

Definition at line 181 of file JobCollection.cpp.

void JobCollection::aboutToBeQueued ( WeaverInterface *  weaver  )  [protected, virtual]

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 249 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 305 of file JobCollection.cpp.

void JobCollection::internalJobDone ( Job *  job  )  [protected, virtual]

Callback method for done jobs.

Reimplemented in ThreadWeaver::JobSequence.

Definition at line 299 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 236 of file JobCollection.cpp.

const int JobCollection::jobListLength (  )  [protected]

Return the number of jobs in the joblist.

Definition at line 243 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

ThreadWeaver

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal