-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu_old.h
87 lines (68 loc) · 2 KB
/
Menu_old.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
#ifndef HOTEL_MENU_H
#define HOTEL_MENU_H
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <list>
#include <cmath>
#include <string>
#include <algorithm>
using namespace std;
class Menu_old{
private:
vector <string> membros = {};
public:
Menu_old() {};
~Menu_old() {};
template<class T>
void PrintV(const vector<T> &v) {
int vsize = v.size();
cout << endl;
cout << "|||-> " << endl << endl;
for (int i = 0; vsize > i; i++){
v[i].Info();
cout << endl;
}
cout << "<-||| " << endl;
}
template<class T>
void PrintList(const list<T> &l) {
cout << endl;
cout << "|||-> " << endl << endl;
for (auto it = l.begin(); it != l.end(); it++){
(*it).Info();
cout << endl;
}
cout << "<-||| " << endl;
}
string NomeFicheiro();
void printTitle(string titulo);
void printOp(vector <string> opcoes, bool aviso, bool enm);
unsigned ProcessarInputInt(vector <string> opcoes, string titulo, unsigned liminf, unsigned limsup);
unsigned ProcessInputInt(vector <string> opcoes, string titulo);
vector <int> ProcessarIntIndef(string colecao_sing, string colecao_plural, int lim);
template<class T>
vector <int> ProcessarIntIndef(string colecao_sing, string colecao_plural, int lim, list <T> l);
template<class T>
T InputRestrito(string texto);
string InputNome(string texto);
char InputLetra(string texto);
//data InputData(string texto);
//nota_avaliacao InputNota(string texto);
template<class T>
bool ProcuraValida(int id, list <T> l);
template<class T>
T EfetuarProcura(int id, list <T> l);
template<class T>
int ProcessarInputProcura(string titulo, list <T> l);
void Start();
//void Importar();
//void VerInfo();
//void Adicionar();
//void Apagar();
//void Exportar();
//void Outros();
void mainMenu();
};
#endif //HOTEL_MENU_H