ME 305 Group 6 Documentation
Public Member Functions | List of all members
printqueue.PrintQueue Class Reference

A queue of print jobs to be printed by the user interface. More...

Public Member Functions

def __init__ (self)
 Constructs an empty print queue.
 
def add_job (self, PrintJob new_job)
 Adds a printjob to the queue. More...
 
def quick_print (self, str text)
 @ brief Adds a printjob to the queue from a string More...
 
def get_job (self)
 Get the next job from the print queue. More...
 
def num_in (self)
 Find the number of items in the queue. More...
 

Detailed Description

A queue of print jobs to be printed by the user interface.

Values can be placed into queue and will be printed in the order they have been queued. Will check a timeout for a print job if necessary to avoid printing severely lagged data.

Member Function Documentation

◆ add_job()

def printqueue.PrintQueue.add_job (   self,
PrintJob  new_job 
)

Adds a printjob to the queue.

Must provide a printjob object to the function. Adds the job to the end of the queue.

Parameters
new_jobPrintJob object to be added the print queue

◆ get_job()

def printqueue.PrintQueue.get_job (   self)

Get the next job from the print queue.

Gets the next job from the print queue. Only returns a job if the timeout has not yet passed.

Returns
String to be printed

◆ num_in()

def printqueue.PrintQueue.num_in (   self)

Find the number of items in the queue.

Call before get().

Returns
The number of items in the queue

◆ quick_print()

def printqueue.PrintQueue.quick_print (   self,
str  text 
)

@ brief Adds a printjob to the queue from a string

Must provide a string to the function. Adds the job to the end of the queue.

Parameters
textString of text to be printed

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