ThreadWeaver
#include <JobCollection.h>
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
|
explicit |
Definition at line 131 of file JobCollection.cpp.
JobCollection::~JobCollection | ( | ) |
Definition at line 137 of file JobCollection.cpp.
Member Function Documentation
|
protectedvirtual |
Overload to dequeue the collection.
Reimplemented from ThreadWeaver::Job.
Definition at line 181 of file JobCollection.cpp.
|
protectedvirtual |
Overload to queue the collection.
Reimplemented from ThreadWeaver::Job.
Reimplemented in ThreadWeaver::JobSequence.
Definition at line 167 of file JobCollection.cpp.
|
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.
|
virtual |
Overload to manage recursive sets.
Reimplemented from ThreadWeaver::Job.
Definition at line 252 of file JobCollection.cpp.
|
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.
|
protectedvirtual |
Callback method for done jobs.
Reimplemented in ThreadWeaver::JobSequence.
Definition at line 302 of file JobCollection.cpp.
|
protected |
Return a reference to the job in the job list at position i.
Definition at line 239 of file JobCollection.cpp.
|
protected |
Return the number of jobs in the joblist.
Definition at line 246 of file JobCollection.cpp.
|
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:
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.