9#ifndef THREADWEAVER_IDDECORATOR_H
10#define THREADWEAVER_IDDECORATOR_H
14#include "jobinterface.h"
15#include "threadweaver_export.h"
28 explicit IdDecorator(JobInterface *job,
bool autoDelete =
true);
31 const JobInterface *
job()
const;
51 void execute(
const JobPointer &job,
Thread *)
override;
52 void blockingExecute()
override;
53 Executor *setExecutor(Executor *executor)
override;
54 Executor *executor()
const override;
55 int priority()
const override;
56 void setStatus(Status)
override;
57 Status status()
const override;
58 bool success()
const override;
59 void requestAbort()
override;
60 void aboutToBeQueued(QueueAPI *api)
override;
61 void aboutToBeQueued_locked(QueueAPI *api)
override;
62 void aboutToBeDequeued(QueueAPI *api)
override;
63 void aboutToBeDequeued_locked(QueueAPI *api)
override;
64 bool isFinished()
const override;
67 QList<QueuePolicy *> queuePolicies()
const override;
68 QMutex *mutex()
const override;
71 void run(JobPointer self,
Thread *thread)
override;
72 void defaultBegin(
const JobPointer &job,
Thread *thread)
override;
73 void defaultEnd(
const JobPointer &job,
Thread *thread)
override;
A Collection is a vector of Jobs that will be queued together.
Definition collection.h:32
IdDecorator decorates a job without changing it's behaviour.
Definition iddecorator.h:26
const Collection * collection() const
Retrieve the decorated job as a Collection.
Collection * collection()
Retrieve the decorated job as a Collection.
const JobInterface * job() const
Retrieve the decorated job.
Sequence * sequence()
Retrieve the decorated job as a Sequence.
JobInterface * job()
Retrieve the decorated job.
const Sequence * sequence() const
Retrieve the decorated job as a Sequence.
bool autoDelete() const
Will the decoratee be auto-deleted?
void setAutoDelete(bool onOff)
Auto-delete the decoratee or not.
QueuePolicy is an interface for customizations of the queueing behaviour of jobs.
Definition queuepolicy.h:39
A Sequence is a vector of Jobs that will be executed in a sequence.
Definition sequence.h:31
Thread represents a worker thread in a Queue's inventory.
Definition thread.h:28