• 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
 

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 ()
 

Additional Inherited Members

- Signals inherited from ThreadWeaver::Job
void done (ThreadWeaver::Job *)
 
void failed (ThreadWeaver::Job *)
 
void started (ThreadWeaver::Job *)
 
- Protected Attributes inherited from ThreadWeaver::Job
Private * d
 

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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:53 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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