//  JobStream.h        Dave Reed        2/5/05
////////////////////////////////////////////////////////////////

#ifndef _JOBSTREAM_
#define _JOBSTREAM_

#include <string>
#include <queue>
#include "Job.h"
using namespace std;

class JobStream
{
  public:
    JobStream(string filename);          // CONSTRUCTOR, INITIALIZES TO DATA FILE
    
    bool jobsRemaining() const;          // RETURNS TRUE IF ANY JOBS LEFT TO BE PROCESSED
    bool jobHasArrived(int time) const;  // RETURNS TRUE IF JOB HAS ARRIVED BY GIVEN TIME
    Job getJob();                        // RETURNS NEXT JOB (AND REMOVES FROM STREAM)

  private:
    queue<Job> arrivingJobs;
};

#endif
 
