From c5431e4d321dbf0152e6826841c1ef5c1291ba5b Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 14 Jun 2022 15:38:50 +0300 Subject: Added files from project 2 (mirror) --- .../Project 2/docs/html/classMenu.html | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 Year 1/Object-oriented Programming/Project 2/docs/html/classMenu.html (limited to 'Year 1/Object-oriented Programming/Project 2/docs/html/classMenu.html') diff --git a/Year 1/Object-oriented Programming/Project 2/docs/html/classMenu.html b/Year 1/Object-oriented Programming/Project 2/docs/html/classMenu.html new file mode 100644 index 0000000..3aff43b --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 2/docs/html/classMenu.html @@ -0,0 +1,132 @@ + + + + + + + +FMI Table: Menu Class Reference + + + + + + + + + +
+
+ + + + + + +
+
FMI Table +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 2 | Project Topic 7 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
Menu Class Reference
+
+
+ +

Handles navigation between multiple commands. + More...

+ +

#include <Menu.h>

+ + + + + + + + + + + + + + +

+Public Member Functions

+ Menu ()
 Sets name as "Menu", leaves all flags to false and creates an empty Command list.
 
+ Menu (const Command *commands, unsigned commandCount)
 Copies commands.
 
+void addCommand (const Command &command)
 Adds a command to the internal Command list.
 
void navigate () const
 Lists commands and after user input executes an appropriate command run() function. More...
 
+

Detailed Description

+

Handles navigation between multiple commands.

+

Shows the title, then below it an Error/Warning/Success message if set, lists all command options as an enumerated list, takes command index and calls the chosen command's run() function.

+

Member Function Documentation

+ +

◆ navigate()

+ +
+
+ + + + + + + +
void Menu::navigate () const
+
+ +

Lists commands and after user input executes an appropriate command run() function.

+

Prints the title, then an Error/Warning/Sucess message (if set), prints all command names as an ordered list (starting from 1), waits for user input to select one of those commands (by list number) and finally executes the appropriate command's run() function.

+

After the run() function exists, everything is reprinted. The 0 list index is always "Go Back"/"Exit" and it always stops the reprinting loop.

+

If there are no commands, prints "Menu is empty!". If user input doesn't correspond to any command, registers an error message and reprints.

+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + -- cgit v1.3.1-23-gd82d