-
Notifications
You must be signed in to change notification settings - Fork 0
/
Menu.h
69 lines (63 loc) · 1.67 KB
/
Menu.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
//
// Created by Slayton on 12/2/2017.
//
#include <ctime>
#include <stack>
#include "Codex.h"
#ifndef THECONLANGCOMPILER_MENU_H
#define THECONLANGCOMPILER_MENU_H
class Menu {
protected:
stack<Menu*>* menus;
Codex* codex;
string prompt;
vector<pair<string, string>> options;
public:
Menu();
Menu(stack<Menu*>* menusInput);
Menu(stack<Menu*>* menusInput, Codex* codexInput);
void populateMenu(string promptInput, vector<pair<string, string>> optionsInput);
string ensureProperInput();
string ensureProperInput(string promptInput, vector<pair<string, string>> optionsInput);
virtual bool run();
void halt();
};
class StatisticsMenu : public Menu {
public:
StatisticsMenu(stack<Menu*>* menuInput, Codex* codexInput);
bool run() override;
};
class GrammarMenu : public Menu {
public:
GrammarMenu(stack<Menu*>* menuInput, Codex* codexInput);
bool run() override;
};
class DictionaryMenu : public Menu {
public:
DictionaryMenu(stack<Menu*>* menuInput, Codex* codexInput);
bool run() override;
};
class AddWordMenu : public Menu {
public:
AddWordMenu(stack<Menu*>* menuInput, Codex* codexInput);
bool run() override;
};
class SentanceMenu : public Menu {
public:
SentanceMenu(stack<Menu*>* menuInput, Codex* codexInput);
bool run() override;
};
class MainMenu : public Menu {
public:
MainMenu(stack<Menu*>* menuInput);
bool run() override;
// Main Menu Specific Methods
Codex* createNewLanguage();
Codex* loadExistingLanguage();
};
class LanguageMenu : public Menu {
public:
LanguageMenu(stack<Menu*>* menuInput, Codex* codexInput);
bool run() override;
};
#endif //THECONLANGCOMPILER_MENU_H