-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCustomerOrder.h
39 lines (37 loc) · 1.03 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
//Sina Lahsaee
//129948162
#pragma once
// CustomerOrder Milestone - CustomerOrder Interface
// CustomerOrder.h
// Chris Szalwinski
// v1.0 - 9/11/2015
// v2.0 - 23/02/2016
#include <iostream>
#include <string>
#ifndef _MSC_VER
#define NOEXCEPT noexcept
#else
#define NOEXCEPT
#endif
class Item;
class CustomerItem;
class CustomerOrder {
std::string name; // name of the customer
std::string product; // name of the product
CustomerItem* order; // address of the customer requests
unsigned int nOrders; // number of requests
static size_t field_width; // current maximum field width
public:
CustomerOrder(const std::string&);
CustomerOrder(const CustomerOrder&);
CustomerOrder& operator=(const CustomerOrder&) = delete;
CustomerOrder(CustomerOrder&&) noexcept;
CustomerOrder&& operator=(CustomerOrder&&) noexcept;
~CustomerOrder();
unsigned int noOrders() const;
const std::string& operator[](unsigned int) const;
void fill(Item&);
void remove(Item&);
bool empty() const;
void display(std::ostream&) const;
};