Website Summary Files Commits Branches @commit @diff @stats
path: root / src / ConsoleInterface
diff options
context:
space:
mode:
2 files changed, 28 insertions, 19 deletions
-rw-r--r--src/ConsoleInterface/Toolbox.cpp22
-rw-r--r--src/ConsoleInterface/Toolbox.hpp25
diff --git a/src/ConsoleInterface/Toolbox.cpp b/src/ConsoleInterface/Toolbox.cpp
index 1a3bb7b..81f4525 100644
--- a/src/ConsoleInterface/Toolbox.cpp
+++ b/src/ConsoleInterface/Toolbox.cpp
@@ -9,3 +9,25 @@ void resetOrderedList(int starter) {
void _printOrderedListBeginning() {
std::cout << orderedListIndex << ". ";
}
+
+void inputBoxLabel(const char* label) {
+ std::cout << "+ " << label;
+}
+
+void inputLineBox(const char* label, char* output, unsigned maxWidth) {
+ inputBoxLabel(label);
+ std::cin.getline(output, maxWidth);
+}
+
+void printTitle(const char* title) {
+ std::cout << "## " << title << " ##" << std::endl;
+}
+
+void printSuccess(const char* message) {
+ std::cout << ") " << message << std::endl;
+}
+
+void printError(const char* message) {
+ std::cout << "! Err: " << message << std::endl;
+}
+
diff --git a/src/ConsoleInterface/Toolbox.hpp b/src/ConsoleInterface/Toolbox.hpp
index 69e9298..1d360cb 100644
--- a/src/ConsoleInterface/Toolbox.hpp
+++ b/src/ConsoleInterface/Toolbox.hpp
@@ -44,11 +44,9 @@ void printOrderedListElem(const T& elem) {
printLine(elem);
}
-void resetOrderedList(int starter);
+void resetOrderedList(int starter = 1);
-void inputBoxLabel(const char* label) {
- std::cout << "+ " << label;
-}
+void inputBoxLabel(const char* label);
template <typename T>
void inputBox(const char* label, T* output) {
@@ -56,21 +54,10 @@ void inputBox(const char* label, T* output) {
std::cin >> *output;
}
-void inputLineBox(const char* label, char* output, unsigned maxWidth) {
- inputBoxLabel(label);
- std::cin.getline(output, maxWidth);
-}
-
-void printTitle(const char* title) {
- std::cout << "## " << title << " ##" << std::endl;
-}
-
-void printSuccess(const char* message) {
- std::cout << ") " << message << std::endl;
-}
+void inputLineBox(const char* label, char* output, unsigned maxWidth);
-void printError(const char* message) {
- std::cout << "! Err: " << message << std::endl;
-}
+void printTitle(const char* title);
+void printSuccess(const char* message);
+void printError(const char* message);
#endif