-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomerOrder.h
More file actions
44 lines (38 loc) · 1.27 KB
/
CustomerOrder.h
File metadata and controls
44 lines (38 loc) · 1.27 KB
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
// Name: Phu Thong Pham
// Seneca Student ID: 106455199
// Seneca email: ptpham4@myseneca.ca
// Date of completion: Nov 20, 2020
//
// I confirm that I am the only author of this file
// and the content was created entirely by me.
#ifndef SDDS_CUSTOMERORDER_H
#define SDDS_CUSTOMERORDER_H
#include <iostream>
#include <string>
#include "Station.h"
struct Item {
std::string m_itemName;
unsigned int m_serialNumber = 0;
bool m_isFilled = false;
explicit Item(const std::string& src) : m_itemName(src) {};
};
class CustomerOrder {
std::string m_name;
std::string m_product;
unsigned int m_cntItem = 0u;
Item** m_lstItem = nullptr;
static size_t m_widthField;
public:
CustomerOrder() = default;
explicit CustomerOrder(const std::string& custOrderInit);
CustomerOrder(const CustomerOrder& customerOrder);
CustomerOrder& operator=(const CustomerOrder& customerOrder) = delete;
CustomerOrder(CustomerOrder&& customerOrder) noexcept;
CustomerOrder& operator=(CustomerOrder&& customerOrder) noexcept;
bool isOrderFilled() const;
bool isItemFilled(const std::string& itemName) const;
void fillItem(Station& station, std::ostream& os);
void display(std::ostream& os) const;
~CustomerOrder();
};
#endif // SDDS_CUSTOMERORDER_H