Odyssey::JobQueue Class Reference

#include <JobQueue.h>

List of all members.

Public Member Functions

 JobQueue ()
void queueJob (JobPtr job, const Job::VariableMap &args=Job::VariableMap())
 Queues a new job at the end of the list.
void queueDynamicJob (const String &typeID, const Job::VariableMap &args=Job::VariableMap(), const Config &conig=Config())
 Queues a new job dynamically created with the given type ID.
size_t getJobCount () const
 Returns the number of queued jobs.
JobPtr dequeueJob ()
 Removes the first job from the queue and returns it.
void clearJobs ()
 Removes all the jobs from this queue.
void executeFirst (const Job::VariableMap &args=Job::VariableMap())
 Executes the first job on the queue, using the given arguments.
void execute ()
 Executes all the stored jobs in order.
void execute (float32 limit)
 Executes each job in order until the given time limit is reached.

Classes

struct  JobInstance


Constructor & Destructor Documentation

Odyssey::JobQueue::JobQueue  ) 
 


Member Function Documentation

void Odyssey::JobQueue::clearJobs  ) 
 

Removes all the jobs from this queue.

JobPtr Odyssey::JobQueue::dequeueJob  ) 
 

Removes the first job from the queue and returns it.

void Odyssey::JobQueue::execute float32  limit  ) 
 

Executes each job in order until the given time limit is reached.

void Odyssey::JobQueue::execute  ) 
 

Executes all the stored jobs in order.

void Odyssey::JobQueue::executeFirst const Job::VariableMap args = Job::VariableMap()  ) 
 

Executes the first job on the queue, using the given arguments.

This function grabs the first queued job and execute it. The given arguments are overlaid over the stored arguments, and may override them on an individual basis.

Parameters:
args the args to overlay in the call to execute

size_t Odyssey::JobQueue::getJobCount  )  const
 

Returns the number of queued jobs.

void Odyssey::JobQueue::queueDynamicJob const String typeID,
const Job::VariableMap args = Job::VariableMap(),
const Config conig = Config()
 

Queues a new job dynamically created with the given type ID.

This function constructs a new job to put at the end of the queue with the given type ID. The args and the config given are used with this new job.

Parameters:
typeID the type ID of the dynamic class to create
args the args to call the execute function with
config the config to set on the new job

void Odyssey::JobQueue::queueJob JobPtr  job,
const Job::VariableMap args = Job::VariableMap()
 

Queues a new job at the end of the list.

The new job is added to the end of the list of jobs, and it is given the args and config passed in.

Parameters:
job the job to add to the queue
args the args to pass to the job's execute function


The documentation for this class was generated from the following file:
Generated on Sun Jan 7 01:18:52 2007 for Odyssey Meta-Engine by  doxygen 1.4.6-NO