My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
DotWorkerThread Class Reference

#include <dot.h>

Inheritance diagram for DotWorkerThread:

Public Member Functions

 DotWorkerThread (DotRunnerQueue *queue)
 
void run ()
 
void cleanup ()
 

Private Attributes

DotRunnerQueuem_queue
 
QList< DotRunner::CleanupItemm_cleanupItems
 

Detailed Description

Worker thread to execute a dot run

Definition at line 450 of file dot.h.

Constructor & Destructor Documentation

DotWorkerThread::DotWorkerThread ( DotRunnerQueue queue)

Definition at line 1145 of file dot.cpp.

References m_cleanupItems.

: m_queue(queue)
{
m_cleanupItems.setAutoDelete(TRUE);
}

Member Function Documentation

void DotWorkerThread::cleanup ( )

Definition at line 1165 of file dot.cpp.

References DotConstString::data(), DotRunner::CleanupItem::file, m_cleanupItems, and DotRunner::CleanupItem::path.

Referenced by run().

{
QListIterator<DotRunner::CleanupItem> it(m_cleanupItems);
for (;(ci=it.current());++it)
{
QDir(ci->path.data()).remove(ci->file.data());
}
}
void DotWorkerThread::run ( )

Definition at line 1151 of file dot.cpp.

References DotRunner::cleanup(), cleanup(), DotRunnerQueue::dequeue(), DotRunner::CleanupItem::file, DotConstString::isEmpty(), m_cleanupItems, m_queue, and DotRunner::run().

{
DotRunner *runner;
while ((runner=m_queue->dequeue()))
{
runner->run();
if (!cleanup.file.isEmpty())
{
m_cleanupItems.append(new DotRunner::CleanupItem(cleanup));
}
}
}

Member Data Documentation

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

Definition at line 458 of file dot.h.

Referenced by cleanup(), DotWorkerThread(), and run().

DotRunnerQueue* DotWorkerThread::m_queue
private

Definition at line 457 of file dot.h.

Referenced by run().


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