Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members  

RazorBack::MTjobbase_ Class Reference

Class MTjobbase_: abstract base class for job objects. More...

#include <MTqueue.hh>

List of all members.

Public Methods

 MTjobbase_ ()
 default ctor.

 MTjobbase_ (const MTjobbase_ &Jb)
 copy ctor.

virtual ~MTjobbase_ ()
 dtor.

virtual void* task ()=0
 task(): this virtual method shall carry out all computations in the thread that got the job. More...

double complexity () const
 complexity([C]): returns [sets] a measure of the task complexity [to C]. More...

bool operator< (const MTjobbase_ &Rhs) const
 comparison operator required by the job queue.


Protected Methods

void complexity (double C)
 Sets the complexity of the job to C.


Private Attributes

double Complexity
 some sort of measure of the complexity of the task.


Detailed Description

Class MTjobbase_: abstract base class for job objects.

The derived objects shall define the methods for carrying out the task and a measure for calculation complexity for setting up a priority queue for jobs. The class of user job objects must always be derived from MTjobbase_.

Definition at line 51 of file MTqueue.hh.


Constructor & Destructor Documentation

RazorBack::MTjobbase_::MTjobbase_ ( ) [inline]
 

default ctor.

Definition at line 62 of file MTqueue.hh.

RazorBack::MTjobbase_::MTjobbase_ ( const MTjobbase_ & Jb ) [inline]
 

copy ctor.

Definition at line 65 of file MTqueue.hh.

RazorBack::MTjobbase_::~MTjobbase_ ( ) [inline, virtual]
 

dtor.

Definition at line 68 of file MTqueue.hh.


Member Function Documentation

void * RazorBack::MTjobbase_::task ( ) [pure virtual]
 

task(): this virtual method shall carry out all computations in the thread that got the job.

All necessary data shall be member variables of the job class derived from MTjobbase_, no extra parameters are accepted. The method may choose to return information pointed to by this dirty void*, or (this is preferred) the derived job class shall be laid out so that the return info is also contained in it.

double RazorBack::MTjobbase_::complexity ( ) const [inline]
 

complexity([C]): returns [sets] a measure of the task complexity [to C].

[Only derived classes may set this value.]

Definition at line 91 of file MTqueue.hh.

Referenced by operator<().

bool RazorBack::MTjobbase_::operator< ( const MTjobbase_ & Rhs ) const [inline]
 

comparison operator required by the job queue.

Definition at line 94 of file MTqueue.hh.

void RazorBack::MTjobbase_::complexity ( double C ) [inline, protected]
 

Sets the complexity of the job to C.

Definition at line 103 of file MTqueue.hh.


Member Data Documentation

double RazorBack::MTjobbase_::Complexity [private]
 

some sort of measure of the complexity of the task.

Definition at line 56 of file MTqueue.hh.


The documentation for this class was generated from the following file:
Generated at Wed Aug 21 09:33:34 2002 for The Razorback C++ Library: POSIX Thread Wrappers by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001