Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Generic / ConsoleInterface / Toolbox.hpp
diff options
context:
space:
mode:
Commit9097bced161430813b6dd1980b0b2f6c2bd09b32 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 07:58:46 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 07:58:46 +0300
Files62ddf909db26bcdd695ac4600ae9f3882a85921f /src/Generic/ConsoleInterface/Toolbox.hpp
FMI-OOP-P2_Tables-9097bced161430813b6dd1980b0b2f6c2bd09b32.tar
FMI-OOP-P2_Tables-9097bced161430813b6dd1980b0b2f6c2bd09b32.tar.gz
FMI-OOP-P2_Tables-9097bced161430813b6dd1980b0b2f6c2bd09b32.zip
Parentcf991dc2d8694bfc6d457133b44cb4a760f93724 (diff)
Autocommit at 29.05.2022 @ 07:58
1 files changed, 5 insertions, 6 deletions
-rw-r--r--src/Generic/ConsoleInterface/Toolbox.hpp11
diff --git a/src/Generic/ConsoleInterface/Toolbox.hpp b/src/Generic/ConsoleInterface/Toolbox.hpp
index 4fb8214..e590a25 100644
--- a/src/Generic/ConsoleInterface/Toolbox.hpp
+++ b/src/Generic/ConsoleInterface/Toolbox.hpp
@@ -2,6 +2,8 @@
#define HEADER_CONSOLEINTERFACE_TOOLBOX
#include <iostream>
+#include "../List/List.hpp"
+#include "../String/String.h"
/*! \file Toolbox.hpp
* \brief Stores a wide range of functions for simpler/more automated printing.
@@ -19,11 +21,8 @@ void clear();
//! Prints label, gets a whole line of input and stores it to output
void inputLineBox(const char* label, char* output, unsigned maxWidth, bool ignore = true);
-//! Prints a string as a table
-void table(unsigned startNumber, unsigned columns, const char* items);
-
-//! Semi-internal function that prints the label of an input box
-void _printInputBoxLabel(const char* label);
+//! Prints a string list as a table
+void table(const List<String>& items);
//! Reads user input and stores it
template <typename T>
@@ -64,7 +63,7 @@ void printLine(const T& item) {
//! Prints a label and then reads user input and stores it
template <typename T>
void inputBox(const char* label, T* output) {
- _printInputBoxLabel(label);
+ print(label);
std::cin >> *output;
}