-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemporium.h
92 lines (77 loc) · 2.71 KB
/
emporium.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#ifndef EMPORIUM_H
#define EMPORIUM_H
#include "container.h"
#include "scoop.h"
#include "topping.h"
#include "serving.h"
#include "order.h"
#include "server.h"
#include "customer.h"
#include "manager.h"
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
namespace Mice {
class Emporium {
public:
Emporium(std::string name);
Emporium(std::istream& ist);
void save(std::ostream& ost);
std::string name();
double cash_register();
void debit(double amount);
void credit(double amount);
int next_id();
int num_containers();
int num_scoops();
int num_toppings();
int num_orders();
int num_servers();
int num_customers();
int num_removed_containers();
int num_removed_scoops();
int num_removed_toppings();
int num_removed_servers();
Container& removed_container(int index);
Scoop& removed_scoop(int index);
Topping& removed_topping(int index);
Server& removed_server(int index);
Container& container(int index);
Scoop& scoop(int index);
Topping& topping(int index);
Order& order(int index);
Server& server(int index);
Customer& customer(int index);
void add_container(Container container);
void add_scoop(Scoop scoop);
void add_topping(Topping topping);
void add_order(Order order);
void add_server(Server server);
void add_customer(Customer customer);
void add_manager(Manager manager);
void scoop_setter(Scoop scoop, int scoop_index);
void container_setter(Container container, int index);
void topping_setter(Topping toppping, int index);
void container_remover(int index);
void scoop_remover(int index);
void topping_remover(int index);
void server_remover(int index);
private:
std::string _name;
double _cash_register;
int _id;
std::vector<Mice::Container> _containers; // All defined containers
std::vector<Mice::Scoop> _scoops; // All defined scoops
std::vector<Mice::Topping> _toppings; // All defined toppings
std::vector<Mice::Order> _orders; // All defined orders
std::vector<Mice::Server> _servers; // All defined servers
std::vector<Mice::Customer> _customers; // All defined customers
std::vector<Mice::Manager> _managers;
std::vector<Mice::Container> _removed_containers;
std::vector<Mice::Scoop> _removed_scoops;
std::vector<Mice::Topping> _removed_toppings;
std::vector<Mice::Server> _removed_servers;
};
}
#endif