Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

WorkQueue.h

Go to the documentation of this file.
00001 
00023 
00024 class CWorkQueueItem {
00025 public:
00027     virtual void    ThreadWork  (void)  = 0;
00029     virtual void    QueueDelCB  (void)  {}
00031     virtual void    QueueAddCB  (void)  {}
00032 };
00033 
00035 class CWorkQueue {
00036 public:
00037     CWorkQueue  (CSyncObject *pextEvent);
00038     ~CWorkQueue (void);
00039 
00040     bool            AddItem             (CWorkQueueItem *pFileAttr, bool uniqueItem = true);
00041     bool            DelItem             (CWorkQueueItem *pFileAttr);
00042     bool            CheckItem           (CWorkQueueItem *pFileAttr, bool ProcessOnly = false);
00044     CWorkQueueItem  *GetProcItem        (void)  {return m_WorkItem;}
00045 
00046 private:
00047     bool            WorkerThread        (void);
00049     static UINT     WorkerThreadStart   (CWorkQueue *pQueue) {return pQueue->WorkerThread();}
00050 
00052     CEvent          m_WorkEvent;
00054     CMutex          m_WorkQueueMutex;
00056     CSyncObject     *m_pThreadEvents[2];
00058     CWinThread      *m_pWorkerThread;
00060     bool            m_PendDelete;
00062     CWorkQueueItem  *m_WorkItem;
00064     CTypedPtrList<CPtrList, CWorkQueueItem*>    m_WorkQueue;
00065 };

Generated on Mon Nov 10 22:18:59 2003 for Moonlight's eMule Tweaks Documentation by doxygen 1.3.4