Public Member Functions | Private Attributes | List of all members
DotWorkerThread Class Reference

#include <dot.h>

Inheritance diagram for DotWorkerThread:
QThread

Public Member Functions

 DotWorkerThread (DotRunnerQueue *queue)
 
void run ()
 
void cleanup ()
 
- Public Member Functions inherited from QThread
 QThread ()
 
virtual ~QThread ()
 
bool isFinished () const
 
bool isRunning () const
 
void start ()
 
void terminate ()
 
void wait ()
 
void setStackSize (unsigned int stackSize)
 
unsigned int stackSize () const
 

Private Attributes

DotRunnerQueuem_queue
 
QList< DotRunner::CleanupItemm_cleanupItems
 

Additional Inherited Members

- Static Public Member Functions inherited from QThread
static int idealThreadCount ()
 
- Protected Member Functions inherited from QThread
virtual void started ()
 
virtual void finished ()
 
virtual void terminated ()
 

Detailed Description

Worker thread to execute a dot run

Definition at line 442 of file dot.h.

Constructor & Destructor Documentation

DotWorkerThread::DotWorkerThread ( DotRunnerQueue queue)

Definition at line 1187 of file dot.cpp.

1188  : m_queue(queue)
1189 {
1191 }
DotRunnerQueue * m_queue
Definition: dot.h:449
void setAutoDelete(bool enable)
Definition: qlist.h:99
const bool TRUE
Definition: qglobal.h:371
QList< DotRunner::CleanupItem > m_cleanupItems
Definition: dot.h:450

Member Function Documentation

void DotWorkerThread::cleanup ( )

Definition at line 1207 of file dot.cpp.

1208 {
1211  for (;(ci=it.current());++it)
1212  {
1213  QDir(ci->path.data()).remove(ci->file.data());
1214  }
1215 }
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
DotConstString file
Definition: dot.h:362
DotConstString path
Definition: dot.h:361
const char * data() const
Definition: dot.h:337
QList< DotRunner::CleanupItem > m_cleanupItems
Definition: dot.h:450
void DotWorkerThread::run ( )
virtual

Reimplemented from QThread.

Definition at line 1193 of file dot.cpp.

1194 {
1195  DotRunner *runner;
1196  while ((runner=m_queue->dequeue()))
1197  {
1198  runner->run();
1199  const DotRunner::CleanupItem &cleanup = runner->cleanup();
1200  if (!cleanup.file.isEmpty())
1201  {
1203  }
1204  }
1205 }
const CleanupItem & cleanup() const
Definition: dot.h:380
Definition: dot.h:356
bool isEmpty() const
Definition: dot.h:338
void append(const type *d)
Definition: qlist.h:73
DotConstString file
Definition: dot.h:362
bool run()
Definition: dot.cpp:819
DotRunner * dequeue()
Definition: dot.cpp:1167
DotRunnerQueue * m_queue
Definition: dot.h:449
void cleanup()
Definition: dot.cpp:1207
QList< DotRunner::CleanupItem > m_cleanupItems
Definition: dot.h:450

Member Data Documentation

QList<DotRunner::CleanupItem> DotWorkerThread::m_cleanupItems
private

Definition at line 450 of file dot.h.

DotRunnerQueue* DotWorkerThread::m_queue
private

Definition at line 449 of file dot.h.


The documentation for this class was generated from the following files: