|
|
@@ -3,14 +3,11 @@ |
|
|
|
// See www.armresearch.com for more information.
|
|
|
|
//
|
|
|
|
// The InputProcessor is responsible for accpting and parsing commands from
|
|
|
|
// CommuniGate, assigning Jobs to Workers, and watching for the QUIT command.
|
|
|
|
// CommuniGate.
|
|
|
|
|
|
|
|
#ifndef IncludedInputProcessor
|
|
|
|
#define IncludedInputProcessor
|
|
|
|
|
|
|
|
#include "JobPool.hpp"
|
|
|
|
#include "WorkerPool.hpp"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
@@ -28,12 +25,8 @@ struct Command { |
|
|
|
};
|
|
|
|
|
|
|
|
class InputProcessor { // Here is the InputProcessor object.
|
|
|
|
private:
|
|
|
|
JobPool& Jobs; // It knows where to get jobs.
|
|
|
|
WorkerPool& Workers; // It knows where to get workers.
|
|
|
|
|
|
|
|
public:
|
|
|
|
InputProcessor(JobPool J, WorkerPool W);
|
|
|
|
Command getCommand(); // One method: get the next command.
|
|
|
|
|
|
|
|
};
|