ThreadWeaver
ThreadWeaver::JobCollection Class Reference
#include <JobCollection.h>

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.
Definition at line 46 of file JobCollection.h.
Public Slots | |
| void | stop (ThreadWeaver::Job *job) |
Public Member Functions | |
| JobCollection (QObject *parent=0) | |
| ~JobCollection () | |
| virtual void | addJob (Job *) |
| bool | canBeExecuted () |
Protected Member Functions | |
| void | aboutToBeQueued (WeaverInterface *weaver) |
| void | aboutToBeDequeued (WeaverInterface *weaver) |
| Job * | jobAt (int i) |
| const int | jobListLength () |
| virtual void | internalJobDone (Job *) |
| void | finalCleanup () |
Friends | |
| class | JobCollectionJobRunner |
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::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 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 152 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 164 of file JobCollection.cpp.
| void JobCollection::aboutToBeDequeued | ( | WeaverInterface * | weaver | ) | [protected, virtual] |
Overload to dequeue the collection.
Reimplemented from ThreadWeaver::Job.
Definition at line 178 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 233 of file JobCollection.cpp.
| const int JobCollection::jobListLength | ( | ) | [protected] |
| void JobCollection::internalJobDone | ( | Job * | job | ) | [protected, virtual] |
Callback method for done jobs.
Reimplemented in ThreadWeaver::JobSequence.
Definition at line 260 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 288 of file JobCollection.cpp.
Friends And Related Function Documentation
friend class JobCollectionJobRunner [friend] |
Definition at line 48 of file JobCollection.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference