-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorkstation.h
More file actions
35 lines (30 loc) · 926 Bytes
/
Workstation.h
File metadata and controls
35 lines (30 loc) · 926 Bytes
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
31
32
33
34
35
#ifndef SDDS_WORKSTATION_H
#define SDDS_WORKSTATION_H
#include <iomanip>
#include <vector>
#include <queue>
#include <iostream>
#include "Utilities.h"
#include "CustomerOrder.h"
namespace sdds
{
extern std::vector<CustomerOrder> g_pending;
extern std::vector<CustomerOrder> g_completed;
extern std::vector<CustomerOrder> g_incomplete;
class Workstation : public Station
{
std::vector<CustomerOrder> m_orders = {};
Workstation *m_pNextStation = nullptr;
public:
Workstation(const std::string &);
void fill(std::ostream &os);
bool attemptToMoveOrder();
void setNextStation(Workstation *station);
Workstation *getNextStation() const;
void display(std::ostream &os) const;
Workstation &operator+=(CustomerOrder &&newOrder);
void moveOrderToNextStation();
bool checkIfAllOrdersAreCompleted() const;
};
}
#endif