-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCustomerOrder.h
51 lines (38 loc) · 1.32 KB
/
CustomerOrder.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* I have done all the coding by myself and only copied the code that my professor provided to complete my workshops and assignments.
Name: Hayaturehman Ahmadzai
Email: [email protected]
Student ID: 122539166
Created on 2021-07-15.*/
#ifndef SDDS_CUSTOMERORDER_H
#define SDDS_CUSTOMERORDER_H
#include <string>
#include "Station.h"
namespace sdds {
struct Item {
std::string m_itemName;
size_t m_serialNumber{0};
bool m_isFilled{false};
Item(const std::string& src) : m_itemName(src)
{};
};
class CustomerOrder {
std::string m_name;
std::string m_product;
size_t m_cntItem;
Item **m_lstItem;
static size_t m_widthField;
public:
CustomerOrder();
CustomerOrder(const std::string& str);
CustomerOrder(const CustomerOrder&){ throw "Copying Disabled"; };
CustomerOrder& operator=(const CustomerOrder&) = delete;
CustomerOrder(CustomerOrder&& src) noexcept;
CustomerOrder& operator=(CustomerOrder&& src) noexcept;
virtual ~CustomerOrder();
bool isFilled() const;
bool isItemFilled(const std::string& itemName) const;
void fillItem(Station& station, std::ostream& os);
void display(std::ostream& os) const;
};
}
#endif //SDDS_CUSTOMERORDER_H