MythTV  0.26-pre
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Attributes
TaskQueue Class Reference

#include <taskqueue.h>

Inheritance diagram for TaskQueue:
MThread

List of all members.

Public Member Functions

virtual ~TaskQueue ()
void RequestTerminate ()
void Clear ()
void AddTask (long msec, Task *pTask)
void AddTask (TaskTime tt, Task *pTask)
void AddTask (Task *pTask)
TaskGetNextExpiredTask (TaskTime tt, long nWithinMilliSecs=50)

Static Public Member Functions

static TaskQueueInstance ()
static void Shutdown ()

Protected Member Functions

bool IsTermRequested ()
virtual void run ()
 Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.

Protected Attributes

TaskMap m_mapTasks
QMutex m_mutex
bool m_bTermRequested

Private Member Functions

 TaskQueue ()

Static Private Attributes

static TaskQueueg_pTaskQueue = NULL

Detailed Description

Definition at line 79 of file taskqueue.h.


Constructor & Destructor Documentation

TaskQueue::TaskQueue ( ) [private]

Definition at line 87 of file taskqueue.cpp.

Referenced by Instance().

TaskQueue::~TaskQueue ( ) [virtual]

Definition at line 100 of file taskqueue.cpp.


Member Function Documentation

void TaskQueue::run ( void  ) [protected, virtual]

Runs the Qt event loop unless we have a QRunnable, in which case we run the runnable run instead.

Note:
If you override this method you must call RunProlog before you do any work and RunEpilog before you exit the run method.

Reimplemented from MThread.

Definition at line 118 of file taskqueue.cpp.

Definition at line 66 of file taskqueue.cpp.

Referenced by cleanup(), and Eventing::NotifySubscriber().

void TaskQueue::Shutdown ( void  ) [static]

Definition at line 76 of file taskqueue.cpp.

Referenced by MythContext::~MythContext().

Definition at line 109 of file taskqueue.cpp.

Referenced by cleanup().

Definition at line 160 of file taskqueue.cpp.

Referenced by ~TaskQueue().

void TaskQueue::AddTask ( long  msec,
Task pTask 
)
void TaskQueue::AddTask ( TaskTime  tt,
Task pTask 
)

Definition at line 195 of file taskqueue.cpp.

Definition at line 211 of file taskqueue.cpp.

Task * TaskQueue::GetNextExpiredTask ( TaskTime  tt,
long  nWithinMilliSecs = 50 
)

Definition at line 227 of file taskqueue.cpp.

Referenced by run().


Member Data Documentation

TaskQueue * TaskQueue::g_pTaskQueue = NULL [static, private]

Definition at line 84 of file taskqueue.h.

Referenced by Instance(), and Shutdown().

Definition at line 88 of file taskqueue.h.

Referenced by AddTask(), Clear(), and GetNextExpiredTask().

QMutex TaskQueue::m_mutex [protected]

Definition at line 89 of file taskqueue.h.

Referenced by AddTask(), Clear(), and GetNextExpiredTask().

Definition at line 90 of file taskqueue.h.

Referenced by RequestTerminate(), run(), and ~TaskQueue().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends