-
Notifications
You must be signed in to change notification settings - Fork 2
/
Table.h
41 lines (35 loc) · 952 Bytes
/
Table.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
//
// Created by Amit Levizky on 11/3/18.
//
#ifndef TABLE_H_
#define TABLE_H_
#include <vector>
#include "Customer.h"
#include "Dish.h"
typedef std::pair<int, Dish> OrderPair;
class Table{
public:
Table(int t_capacity);
Table(const Table& other);
virtual ~Table();
Table& operator=(const Table& other);
Table(Table &&other);
Table& operator=(Table &&other);
int getCapacity() const;
void addCustomer(Customer* customer);
void removeCustomer(int id);
Customer* getCustomer(int id);
std::vector<Customer*>& getCustomers();
std::vector<OrderPair>& getOrders();
void order(const std::vector<Dish> &menu);
void openTable();
void closeTable();
int getBill();
bool isOpen();
private:
int capacity;
bool open;
std::vector<Customer*> customersList;
std::vector<OrderPair> orderList; //A list of pairs for each order in a table - (customer_id, Dish)
};
#endif //TABLE_H_