ThreadWeaver 5.109.0
Public Member Functions | Protected Member Functions | List of all members
ThreadWeaver::IdDecorator

IdDecorator decorates a job without changing it's behaviour. More...

#include <iddecorator.h>

Public Member Functions

 IdDecorator (JobInterface *job, bool autoDelete=true)
 
void aboutToBeDequeued (QueueAPI *api) override
 
void aboutToBeDequeued_locked (QueueAPI *api) override
 
void aboutToBeQueued (QueueAPI *api) override
 
void aboutToBeQueued_locked (QueueAPI *api) override
 
void assignQueuePolicy (QueuePolicy *) override
 
bool autoDelete () const
 Will the decoratee be auto-deleted?
 
void blockingExecute () override
 
Collectioncollection ()
 Retrieve the decorated job as a Collection.
 
const Collectioncollection () const
 Retrieve the decorated job as a Collection.
 
void execute (const JobPointer &job, Thread *) override
 
Executor * executor () const override
 
bool isFinished () const override
 
JobInterface * job ()
 Retrieve the decorated job.
 
const JobInterface * job () const
 Retrieve the decorated job.
 
QMutex * mutex () const override
 
int priority () const override
 
QList< QueuePolicy * > queuePolicies () const override
 
void removeQueuePolicy (QueuePolicy *) override
 
void requestAbort () override
 
Sequencesequence ()
 Retrieve the decorated job as a Sequence.
 
const Sequencesequence () const
 Retrieve the decorated job as a Sequence.
 
void setAutoDelete (bool onOff)
 Auto-delete the decoratee or not.
 
Executor * setExecutor (Executor *executor) override
 
void setStatus (Status) override
 
Status status () const override
 
bool success () const override
 

Protected Member Functions

void defaultBegin (const JobPointer &job, Thread *thread) override
 
void defaultEnd (const JobPointer &job, Thread *thread) override
 
void run (JobPointer self, Thread *thread) override
 

Detailed Description

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.

Member Function Documentation

◆ autoDelete()

bool ThreadWeaver::IdDecorator::autoDelete ( ) const

Will the decoratee be auto-deleted?

◆ collection() [1/2]

Collection * ThreadWeaver::IdDecorator::collection ( )

Retrieve the decorated job as a Collection.

If the decorated Job is not a Collection, 0 is returned.

◆ collection() [2/2]

const Collection * ThreadWeaver::IdDecorator::collection ( ) const

Retrieve the decorated job as a Collection.

If the decorated Job is not a Collection, 0 is returned.

◆ job() [1/2]

JobInterface * ThreadWeaver::IdDecorator::job ( )

Retrieve the decorated job.

◆ job() [2/2]

const JobInterface * ThreadWeaver::IdDecorator::job ( ) const

Retrieve the decorated job.

◆ sequence() [1/2]

Sequence * ThreadWeaver::IdDecorator::sequence ( )

Retrieve the decorated job as a Sequence.

If the decorated Job is not a Sequence, 0 is returned.

◆ sequence() [2/2]

const Sequence * ThreadWeaver::IdDecorator::sequence ( ) const

Retrieve the decorated job as a Sequence.

If the decorated Job is not a Sequence, 0 is returned.

◆ setAutoDelete()

void ThreadWeaver::IdDecorator::setAutoDelete ( bool  onOff)

Auto-delete the decoratee or not.