From 35831ff8dc30c9884a7c3340414f005a0d4ada10 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 12 May 2022 20:21:09 +0300 Subject: Completely reworked documentation --- docs/html/Menu_8h_source.html | 117 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 docs/html/Menu_8h_source.html (limited to 'docs/html/Menu_8h_source.html') diff --git a/docs/html/Menu_8h_source.html b/docs/html/Menu_8h_source.html new file mode 100644 index 0000000..88f81c1 --- /dev/null +++ b/docs/html/Menu_8h_source.html @@ -0,0 +1,117 @@ + + + + + + + +FMI Ticket System: src/Generic/ConsoleInterface/Menu.h Source File + + + + + + + + + +
+
+ + + + + + +
+
FMI Ticket System +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
Menu.h
+
+
+Go to the documentation of this file.
1#ifndef HEADER_CONSOLEINTERFACE_MENU
+
2#define HEADER_CONSOLEINTERFACE_MENU
+
3
+
8#include "Command.h"
+
9#include "../List/List.hpp"
+
10
+
17class Menu {
+
18 char title[256];
+
19 List<Command> menuOptions;
+
20
+
21 bool backExistsApp;
+
22 bool isSubMenu;
+
23
+
24public:
+
26 Menu();
+
28 Menu(const char* title, bool backExistsApp, bool isSubMenu);
+
30 Menu(const char* title, bool backExistsApp, bool isSubMenu, const Command* commands, unsigned commandCount);
+
31
+
33 void addCommand(const Command& command);
+
34
+
36 void registerError(const char* message) const;
+
38 void registerWarning(const char* message) const;
+
40 void registerSuccess(const char* message) const;
+
41
+
43 void navigate() const;
+
44};
+
45
+
46#endif
+
Stores the declaration of class Command.
+
Stores a 256 character name and a function pointer to be executed when calling run()
Definition: Command.h:12
+ +
Handles navigation between multiple commands.
Definition: Menu.h:17
+
void navigate() const
Lists commands and after user input executes an appropriate command run() function.
Definition: Menu.cpp:93
+
void addCommand(const Command &command)
Adds a command to the internal Command list.
Definition: Menu.cpp:32
+
void registerSuccess(const char *message) const
Tell Menu to show a success message next time it prints.
Definition: Menu.cpp:76
+
void registerWarning(const char *message) const
Tell Menu to show a warning message next time it prints.
Definition: Menu.cpp:64
+
void registerError(const char *message) const
Tell Menu to show an error message next time it prints.
Definition: Menu.cpp:52
+
Menu()
Sets name as "Menu", leaves all flags to false and creates an empty Command list.
Definition: Menu.cpp:5
+
+ + + + -- cgit v1.3.1-23-gd82d