forked from Amitlevizky2/Restaurant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Restaurant.h
54 lines (46 loc) · 1.33 KB
/
Restaurant.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
52
53
54
//
// Created by Amit Levizky on 11/3/18.
//
#ifndef RESTAURANT_H_
#define RESTAURANT_H_
#include <vector>
#include <string>
#include "Dish.h"
#include "Table.h"
#include "Action.h"
class Restaurant{
public:
Restaurant();
Restaurant(const std::string &configFilePath);
Restaurant(const Restaurant &other);
virtual ~Restaurant();
Restaurant(Restaurant &&other);
Restaurant& operator=(const Restaurant &other);
Restaurant& operator=(Restaurant &&other);
void start();
int getNumOfTables() const;
Table* getTable(int ind);
const std::vector<BaseAction*>& getActionsLog() const; // Return a reference to the history of actions
std::vector<Dish>& getMenu();
std::string logOpenTableMsg();
private:
bool open;
int nextCustomerId;
std::vector<Table*> tables;
std::vector<Dish> menu;
std::vector<BaseAction*> actionsLog;
DishType findMyType(std::string strType);
void goOpen(std::string details);
void goOrder(std::string details);
void goMove(std::string details);
void goClose(std::string details);
void goCloseAll();
void goMenu();
void goStatus(std::string details);
void goLog();
void goBackup();
void goRestore();
Customer* createCustomerByType(std::string name, std::string strategy);
std::string newMsg;
};
#endif //RESTAURANT_H_