-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorkstation.h
31 lines (29 loc) · 918 Bytes
/
Workstation.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
31
#ifndef SDDS_WORK_STATION_H
#define SDDS_WORK_STATION_H
#include <deque>
#include"Station.h"
#include "CustomerOrder.h"
namespace sdds
{
extern std::deque<CustomerOrder> g_pending;
extern std::deque<CustomerOrder> g_completed;
extern std::deque<CustomerOrder> g_incomplete;
class Workstation : public Station
{
std::deque<CustomerOrder> m_orders;
Workstation* m_pNextStation{ nullptr };
public:
Workstation(const std::string& str);
void fill(std::ostream& os);
bool attemptToMoveOrder();
void setNextStation(Workstation* station = nullptr);
Workstation* getNextStation() const;
void display(std::ostream& os) const;
Workstation& operator+=(CustomerOrder&& newOrder);
Workstation(const Workstation&) = delete;
Workstation& operator=(const Workstation&) = delete;
Workstation(Workstation&&) = delete;
Workstation& operator=(Workstation&&) = delete;
};
}
#endif // !SDDS_WORK_STATION_H