pdf::Task Class Reference

#include <task.h>

Inheritance diagram for pdf::Task:
Inheritance graph
[legend]
Collaboration diagram for pdf::Task:
Collaboration graph
[legend]

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

Detailed Description

Definition at line 44 of file task.h.


Constructor & Destructor Documentation

pdf::Task::Task (  )  [inline]

Constructor of task.

Definition at line 48 of file task.h.

00049         : state(INIT)
00050     {
00051     }

virtual pdf::Task::~Task (  )  [inline, virtual]

Destructor of task.

Definition at line 54 of file task.h.

00055     {
00056     }


Member Function Documentation

void pdf::Task::abort (  )  [inline]

Definition at line 72 of file task.h.

Referenced by pdf::Thread::abort_task().

00072 { state = ABORTED; }

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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; }

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

00071 { return state == ABORTED; }

Here is the caller graph for this function:

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().

00078 { return state == PAUSE; }

Here is the caller graph for this function:

void pdf::Task::pause (  )  [inline]

Definition at line 79 of file task.h.

00079 { state = PAUSE; }

void pdf::Task::reset (  )  [inline]

Reset the status to "INIT".

Definition at line 75 of file task.h.

Referenced by pdf::PDFSearchTask::execute().

00075 { state = INIT; }

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class Thread [friend]

Definition at line 123 of file task.h.


Field Documentation

Task type.

Definition at line 111 of file task.h.

Referenced by get_type(), pdf::PDFRenderTask::PDFRenderTask(), and pdf::PDFSearchTask::PDFSearchTask().


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208