MITHREAD::QUEUE Class Reference

Class to manage the list of jobs and job subqueues that are given to POOL to execute. More...

#include <mi32/mithread.h>

List of all members.

Public Types

enum  FLAGS { FLAG_Default = 0x0000, FLAG_Synchronized = 0x0001 }

Public Member Functions

 QUEUE (const QUEUE &rhs)
 QUEUE (FLAGS flags=FLAG_Default)
 ~QUEUE ()
ID AddJob (JOB &Job, bool AddToFront=false)
ID AddQueue (QUEUE &Queue, bool AddToFront=false)
FLAGS GetFlags () const
ID GetID () const
bool IsEmpty () const
QUEUEoperator= (const QUEUE &rhs)
void SetDelegateOnCompletion (DELEGATE_VOID_ID delegate)

Detailed Description

Class to manage the list of jobs and job subqueues that are given to POOL to execute.

This class is a reference counted class. Any changes to the queue, such as removal of completed jobs, will change all instances of this queue. There is no MakeExclusive method because JOB's cannot be copied. This does allow a set and forget paradigm for QUEUE's.


Member Enumeration Documentation

Enumerator:
FLAG_Default 

This queue will execute its jobs when a WORKER is available.

FLAG_Synchronized 

This queue will wait until all other jobs before it are finished.


Constructor & Destructor Documentation

MITHREAD::QUEUE::QUEUE ( FLAGS  flags = FLAG_Default  )  [explicit]

Ctor.

MITHREAD::QUEUE::QUEUE ( const QUEUE rhs  ) 

Copy ctor.

MITHREAD::QUEUE::~QUEUE (  ) 

Dtor.


Member Function Documentation

ID MITHREAD::QUEUE::AddJob ( JOB Job,
bool  AddToFront = false 
)

Add a JOB to 'this'.

Returns:
The MITHREAD::ID of the job added
Parameters:
AddToFront If 'true', places the job ahead of all other jobs or subqueues on this queue.
ID MITHREAD::QUEUE::AddQueue ( QUEUE Queue,
bool  AddToFront = false 
)

Add a QUEUE subqueue to 'this'.

Returns:
The MITHREAD::ID of the queue added
Parameters:
Queue The job subqueue to add to this queue. It may contains JOB's or QUEUE's.
AddToFront If 'true', places the subqueue ahead of all other jobs or subqueues on this queue.
FLAGS MITHREAD::QUEUE::GetFlags (  )  const

Get the flags set for 'this'.

Returns:
The set of flags for this queue
ID MITHREAD::QUEUE::GetID (  )  const

Get the ID for 'this'.

Returns:
ID for this queue
bool MITHREAD::QUEUE::IsEmpty (  )  const

Determine if queue is empty.

Should only be used on queue that has not been added to another queue.

QUEUE& MITHREAD::QUEUE::operator= ( const QUEUE rhs  ) 

Assignment operator.

void MITHREAD::QUEUE::SetDelegateOnCompletion ( DELEGATE_VOID_ID  delegate  ) 

Set a delegate that gets called when all the jobs are complete.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:36:39 2012 for TNTsdk 2012 by  doxygen 1.6.1