-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuperMarket.h
48 lines (40 loc) · 1.31 KB
/
SuperMarket.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
//
// Created by Ziad on 4/28/2022.
//
#ifndef DATASTRUCTURE_SUPERMARKET_H
#define DATASTRUCTURE_SUPERMARKET_H
#include <vector>
#include "Seller.h"
#include "Customer.h"
#include "Product.h"
#include "qlocale.h"
#include "ui_mainwindow.h"
#include <QString>
class SuperMarket {
public:
//vector<QString> strings;
vector<Seller> sellers;
vector<Customer> customers;
vector<Product> products;
// This is used to directly access the logged in user (seller or customer) inside its vector
// if the second seller is logged in => loggedInIndex = 1 ;
// seller[loggedInIndex]. ay 7aga fe el functions ba2a
int loggedInIndex;
QString ordernumber;
void readAllFiles();
void writeAllFiles();
void readFromFileIntoSeller();
void readFromFileIntoProduct();
void readFromFileIntoCustomer();
void writeToFileFromCustomer();
void writeToFileFromSeller();
void writeToFileFromProduct();
void readFromFileIntoCustomerCart();
void writeToFileFromCustomerCart();
void readindexfromfileintovariable();
void writeindextofilefromvariable();
void readindexfromfileordernumber();
void writeindextofileordernumber();
QString generateId();
};
#endif //DATASTRUCTURE_SUPERMARKET_H