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

ThreadWeaver

  • sources
  • kde-4.12
  • kdelibs
  • threadweaver
  • Weaver
JobCollection.h
Go to the documentation of this file.
1 /* -*- C++ -*-
2 
3  This file declares the JobCollection class.
4 
5  $ Author: Mirko Boehm $
6  $ Copyright: (C) 2004-2013 Mirko Boehm $
7  $ Contact: mirko@kde.org
8  http://www.kde.org
9  http://creative-destruction.me $
10 
11  This library is free software; you can redistribute it and/or
12  modify it under the terms of the GNU Library General Public
13  License as published by the Free Software Foundation; either
14  version 2 of the License, or (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  Library General Public License for more details.
20 
21  You should have received a copy of the GNU Library General Public License
22  along with this library; see the file COPYING.LIB. If not, write to
23  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24  Boston, MA 02110-1301, USA.
25 
26  $Id: DebuggingAids.h 30 2005-08-16 16:16:04Z mirko $
27 */
28 
29 #ifndef JOBCOLLECTION_H
30 #define JOBCOLLECTION_H
31 
32 #include "Job.h"
33 
34 namespace ThreadWeaver {
35 
36  class Thread;
37  class JobCollectionJobRunner;
38 
49  class THREADWEAVER_EXPORT JobCollection : public Job
50  {
51  friend class JobCollectionJobRunner;
52  Q_OBJECT
53 
54  public:
55  explicit JobCollection ( QObject *parent = 0 );
56  ~JobCollection ();
63  virtual void addJob ( Job* );
64 
66  bool canBeExecuted();
67 
68  public Q_SLOTS:
72  void stop ( ThreadWeaver::Job *job );
73 
74  protected:
76  void aboutToBeQueued ( WeaverInterface *weaver );
77 
79  void aboutToBeDequeued ( WeaverInterface *weaver );
80 
82  Job* jobAt( int i );
83 
84 #ifdef __GNUC__
85 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 1)
86 #pragma GCC diagnostic ignored "-Wignored-qualifiers"
87 #endif
88 #endif
89 
90  const int jobListLength(); // const qualifier is possibly BiC?
91 
94  virtual void internalJobDone( Job* );
95 
101  void finalCleanup();
102 
103  private Q_SLOTS:
104  // called when an internal job runner emits its done(Job*) signal.
105  // JobCollection emits done(Job*) after the last JobCollectionJobRunner finishes
106  void jobRunnerDone();
107 
108  private:
110  void execute ( Thread * );
111 
114  void run() {}
115 
119  void dequeueElements();
120 
121  class Private;
122  Private * const d;
123 
124  };
125 
126 }
127 
128 #endif
Job.h
ThreadWeaver::Thread
The class Thread is used to represent the worker threads in the weaver's inventory.
Definition: Thread.h:46
QObject
ThreadWeaver::WeaverInterface
WeaverInterface provides a common interface for weaver implementations.
Definition: WeaverInterface.h:61
ThreadWeaver::JobCollection
A JobCollection is a vector of Jobs that will be queued together.
Definition: JobCollection.h:49
ThreadWeaver::Job
A Job is a simple abstraction of an action that is to be executed in a thread context.
Definition: Job.h:65
ThreadWeaver::JobCollectionJobRunner
Definition: JobCollection_p.h:45
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