/usr/include/KF5/ThreadWeaver/threadweaver/iddecorator.h is in libkf5threadweaver-dev 5.18.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | /* -*- C++ -*-
Base class for job decorators in ThreadWeaver.
$ Author: Mirko Boehm $
$ Copyright: (C) 2005-2013 Mirko Boehm $
$ Contact: mirko@kde.org
http://www.kde.org
http://creative-destruction.me $
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef THREADWEAVER_IDDECORATOR_H
#define THREADWEAVER_IDDECORATOR_H
#include <QObject>
#include "threadweaver_export.h"
#include "jobinterface.h"
namespace ThreadWeaver
{
class Collection;
class Sequence;
/** @brief IdDecorator decorates a job without changing it's behaviour.
*
* It is supposed to be used as the base class for actual decorators that do change the behaviour of jobs. */
class THREADWEAVER_EXPORT IdDecorator : public JobInterface
{
public:
explicit IdDecorator(JobInterface *job, bool autoDelete = true);
~IdDecorator();
/** Retrieve the decorated job. */
const JobInterface *job() const;
/** Retrieve the decorated job. */
JobInterface *job();
/** Auto-delete the decoratee or not. */
void setAutoDelete(bool onOff);
/** Will the decoratee be auto-deleted? */
bool autoDelete() const;
/** Retrieve the decorated job as a Collection.
* If the decorated Job is not a Collection, 0 is returned. */
const Collection *collection() const;
/** Retrieve the decorated job as a Collection.
* If the decorated Job is not a Collection, 0 is returned. */
Collection *collection();
/** Retrieve the decorated job as a Sequence.
* If the decorated Job is not a Sequence, 0 is returned. */
const Sequence *sequence() const;
/** Retrieve the decorated job as a Sequence.
* If the decorated Job is not a Sequence, 0 is returned. */
Sequence *sequence();
void execute(const JobPointer& job, Thread *) Q_DECL_OVERRIDE;
void blockingExecute() Q_DECL_OVERRIDE;
Executor *setExecutor(Executor *executor) Q_DECL_OVERRIDE;
Executor *executor() const Q_DECL_OVERRIDE;
int priority() const Q_DECL_OVERRIDE;
void setStatus(Status) Q_DECL_OVERRIDE;
Status status() const Q_DECL_OVERRIDE;
bool success() const Q_DECL_OVERRIDE;
void requestAbort() Q_DECL_OVERRIDE;
void aboutToBeQueued(QueueAPI *api) Q_DECL_OVERRIDE;
void aboutToBeQueued_locked(QueueAPI *api) Q_DECL_OVERRIDE;
void aboutToBeDequeued(QueueAPI *api) Q_DECL_OVERRIDE;
void aboutToBeDequeued_locked(QueueAPI *api) Q_DECL_OVERRIDE;
bool isFinished() const Q_DECL_OVERRIDE;
void assignQueuePolicy(QueuePolicy *) Q_DECL_OVERRIDE;
void removeQueuePolicy(QueuePolicy *) Q_DECL_OVERRIDE;
QList<QueuePolicy *> queuePolicies() const Q_DECL_OVERRIDE;
QMutex *mutex() const Q_DECL_OVERRIDE;
protected:
void run(JobPointer self, Thread *thread) Q_DECL_OVERRIDE;
void defaultBegin(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE;
void defaultEnd(const JobPointer& job, Thread *thread) Q_DECL_OVERRIDE;
private:
class Private1;
Private1 *const d1;
class Private2;
Private2 *d2;
};
}
#endif // THREADWEAVER_IDDECORATOR_H
|