Abstraction of a piece of work to be done by WorkerThread Inherit this class to define concrete work items. More...
#include <thread.h>
Inherited by FetchResourceListWorkItem, and ResourceInfoWorkItem.

Public Member Functions | |
| WorkItem () | |
| Construct a new WorkItem. | |
| virtual | ~WorkItem () |
| Destructor. | |
| virtual void | Run ()=0 |
| Implement this in derived class to do the work. | |
| bool | Cancel () |
| Cancel this WorkItem, remove it from queue. | |
| int | GetPriority () const |
Private Attributes | |
| int | m_priority |
| Priority of item, highest is run first. | |
| volatile bool | m_toBeDeleted |
| Should this item be deleted after it has run? | |
| WorkItemQueue * | m_queue |
Friends | |
| class | WorkItemQueue |
| class | WorkerThread |
Abstraction of a piece of work to be done by WorkerThread Inherit this class to define concrete work items.
Definition at line 69 of file thread.h.
| virtual WorkItem::~WorkItem | ( | ) | [inline, virtual] |
| bool WorkItem::Cancel | ( | ) |
Cancel this WorkItem, remove it from queue.
Definition at line 122 of file thread.cpp.
| virtual void WorkItem::Run | ( | ) | [pure virtual] |
Implement this in derived class to do the work.
Implemented in ResourceInfoWorkItem, and FetchResourceListWorkItem.
friend class WorkerThread [friend] |
friend class WorkItemQueue [friend] |
int WorkItem::m_priority [private] |
WorkItemQueue* WorkItem::m_queue [private] |
volatile bool WorkItem::m_toBeDeleted [private] |
1.6.3