From 60cbf65928ed2684220388badbb2de23eadd22d9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 5 May 2022 13:23:21 +0300 Subject: Autocommit at 05.05.2022 @ 13:23 --- src/ConsoleInterface/Toolbox.hpp | 8 ++++++++ src/EventSystem/EventSystem.h | 2 +- src/VenueConsoleUI.cpp | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ConsoleInterface/Toolbox.hpp b/src/ConsoleInterface/Toolbox.hpp index 1af42e2..67ed762 100644 --- a/src/ConsoleInterface/Toolbox.hpp +++ b/src/ConsoleInterface/Toolbox.hpp @@ -44,4 +44,12 @@ void resetOrderedList(int starter = 1) { orderedListIndex = starter; } +template +T inputBox(const char* label) { + print(label); + T temp; + std::cin >> temp; + return temp; +} + #endif diff --git a/src/EventSystem/EventSystem.h b/src/EventSystem/EventSystem.h index 34b42e4..cccb7e6 100644 --- a/src/EventSystem/EventSystem.h +++ b/src/EventSystem/EventSystem.h @@ -17,7 +17,7 @@ public: EventSystem(); EventSystem(const Event* events, unsigned eventCount); - StatusCode createEvent(); + StatusCode createEvent(const Hall* hall, String name, DateTime time); StatusCode cancelEvent(); StatusCode reserveTicket(unsigned eventIndex, char* note, unsigned seatRow, unsigned seatColumn); diff --git a/src/VenueConsoleUI.cpp b/src/VenueConsoleUI.cpp index 9cabbab..8f38e66 100644 --- a/src/VenueConsoleUI.cpp +++ b/src/VenueConsoleUI.cpp @@ -1,9 +1,15 @@ #include "VenueConsoleUI.h" +#include "String/String.h" #include "ConsoleInterface/Menu.h" #include "ConsoleInterface/Toolbox.hpp" Venue v; +void command_newEvent() { + + v.es.createEvent(); +} + void runUI(Venue& venue) { v = venue; } -- cgit v1.3.1-26-gb76a