-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorkstation.h
34 lines (30 loc) · 976 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
32
33
34
#ifndef SDDS_WORKSTATION_H
#define SDDS_WORKSTATION_H
#include <iostream>
#include <deque>
#include "CustomerOrder.h"
#include "Station.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 {
private:
std::deque<CustomerOrder> m_orders{};
Workstation* m_pNextStation{ nullptr };
public:
Workstation() = default;
Workstation(const std::string& str);
Workstation(const Workstation&) = delete;
Workstation& operator=(const Workstation&) = delete;
Workstation(Workstation&&) = delete;
Workstation& operator=(Workstation&&) = delete;
void fill(std::ostream& os = std::cout);
bool attemptToMoveOrder();
void setNextStation(Workstation* station = nullptr);
Workstation* getNextStation() const;
void display(std::ostream& os = std::cout) const;
Workstation& operator+=(CustomerOrder&& newOrder);
};
}
#endif