#include <task.h>
Public Member Functions | |
Task () | |
Constructor of task. | |
virtual | ~Task () |
Destructor of task. | |
virtual void | execute ()=0 |
Execute task with task context. | |
virtual void * | get_user_data ()=0 |
get the user data | |
virtual unsigned int | get_id ()=0 |
get task id | |
TaskType | get_type () const |
get the type of task | |
bool | is_aborted () const |
Check if the task is aborted or not. | |
void | abort () |
void | reset () |
Reset the status to "INIT". | |
bool | is_paused () const |
Pause current task, it can be used in search. | |
void | pause () |
Protected Attributes | |
TaskType | type |
Task type. | |
Friends | |
class | Thread |
Definition at line 44 of file task.h.
pdf::Task::Task | ( | ) | [inline] |
virtual pdf::Task::~Task | ( | ) | [inline, virtual] |
void pdf::Task::abort | ( | ) | [inline] |
Definition at line 72 of file task.h.
Referenced by pdf::Thread::abort_task().
virtual void pdf::Task::execute | ( | ) | [pure virtual] |
Execute task with task context.
Implemented in pdf::PDFRenderTask, and pdf::PDFSearchTask.
virtual unsigned int pdf::Task::get_id | ( | ) | [pure virtual] |
get task id
Implemented in pdf::PDFRenderTask, and pdf::PDFSearchTask.
Referenced by pdf::Thread::abort_task().
TaskType pdf::Task::get_type | ( | ) | const [inline] |
get the type of task
Definition at line 68 of file task.h.
References type.
Referenced by pdf::Thread::abort_task().
00068 { return type; }
virtual void* pdf::Task::get_user_data | ( | ) | [pure virtual] |
get the user data
Implemented in pdf::PDFRenderTask, and pdf::PDFSearchTask.
Referenced by pdf::Thread::abort_task(), and pdf::Thread::cancel_tasks().
bool pdf::Task::is_aborted | ( | ) | const [inline] |
Check if the task is aborted or not.
Definition at line 71 of file task.h.
Referenced by pdf::PDFRenderTask::execute(), pdf::PDFSearcher::seach_all(), and pdf::PDFSearcher::search_next().
bool pdf::Task::is_paused | ( | ) | const [inline] |
Pause current task, it can be used in search.
Definition at line 78 of file task.h.
Referenced by pdf::PDFSearcher::seach_all(), and pdf::PDFSearcher::search_next().
void pdf::Task::reset | ( | ) | [inline] |
Reset the status to "INIT".
Definition at line 75 of file task.h.
Referenced by pdf::PDFSearchTask::execute().
TaskType pdf::Task::type [protected] |
Task type.
Definition at line 111 of file task.h.
Referenced by get_type(), pdf::PDFRenderTask::PDFRenderTask(), and pdf::PDFSearchTask::PDFSearchTask().