23 #ifndef WORKERTHREAD_H
24 #define WORKERTHREAD_H
29 #include <QWaitCondition>
32 #include "baseexception.h"
76 BaseException::operator=(other);
93 virtual const char *
what()
const throw()
95 return "Unknown exception thrown by a ThreadOperation, cannot provide further information";
115 virtual void stop() = 0;
120 virtual void run() = 0;
136 void addOperation(
ThreadOperation* operation,
bool deleteAtEnd =
true );
140 void stopCurrentOperation(
bool wait);
150 bool operationRunning();
168 void exceptionDuringOperation(farsa::BaseException *e);
172 struct ThreadOperationInfo
174 ThreadOperationInfo() :
190 QQueue<ThreadOperationInfo> operations;
194 QWaitCondition waitForOperationsToDo;
196 QWaitCondition waitForOperationsToFinish;
198 ThreadOperationInfo operation;
205 QList<BaseException *> exceptions;
This file contains the common type defitions used on the whole framework.
UnknownException & operator=(const UnknownException &other)
Copy operator.
virtual const char * what() const
Returns a C string describing the exception.
A macro to deprecate functions.
virtual ~UnknownException()
Destructor.
UnknownException(const UnknownException &other)
Copy constructor.
interface for describing an operation to do for the WorkerThread
The exception stored when an unknown exception is thrown by a ThreadOperation.
UnknownException()
Constructor.
the supporting thread in order to run operations on a different thread instead of the GUI thread ...