-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dispatcher.h
30 lines (25 loc) · 893 Bytes
/
Dispatcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//----------------------------------------------------------------------------
// Filename: Dispatcher.h
// Date: 12 November 2013
// Description: interface for the Dispatcher. There are three implementations
// for this class.
//----------------------------------------------------------------------------
#include <iostream>
#include <cstdlib>
using namespace std;
#include "AssemblyLine.h"
class Dispatcher {
public:
Dispatcher(AssemblyLine *list, int size);
void dispatch(PackageQueue *PkgBuffer, int PkgCount);
int al_do_work(int id);
void al_ship(int id, int timeUnit);
void distributeArrivingPkgs(int timeUnit);
void init_aLs(PackageQueue * arrivingPkgBuffer);
void dispatch_to_assembly(Package newPkg);
private:
PackageQueue *arrivingPkgBuffer;
AssemblyLine *aLineList;
int length_aLineList;
int timeUnit;
};