Website Summary Files Commits Branches @commit @diff @stats
path: root / src / EventSystem / EventSystem.cpp
diff options
context:
space:
mode:
Commit8072795058ef5a20b6de6975b79adb47d9524ca9 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-06 11:11:42 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-06 11:11:42 +0300
Files65be99f2425b640dd6b0007be0d6d4c149fd2ff9 /src/EventSystem/EventSystem.cpp
FMI-OOP-P1_TicketSystem-8072795058ef5a20b6de6975b79adb47d9524ca9.tar
FMI-OOP-P1_TicketSystem-8072795058ef5a20b6de6975b79adb47d9524ca9.tar.gz
FMI-OOP-P1_TicketSystem-8072795058ef5a20b6de6975b79adb47d9524ca9.zip
Parentf3af78550f4d1bbfe7577f40ff64174c72578178 (diff)
Autocommit at 06.05.2022 @ 11:11
1 files changed, 9 insertions, 0 deletions
-rw-r--r--src/EventSystem/EventSystem.cpp9
diff --git a/src/EventSystem/EventSystem.cpp b/src/EventSystem/EventSystem.cpp
index 28d9ebb..95bd1c4 100644
--- a/src/EventSystem/EventSystem.cpp
+++ b/src/EventSystem/EventSystem.cpp
@@ -101,6 +101,15 @@ StatusCode EventSystem::buyTicket(const char* name, const Date& date, const Tick
return events[ind].buyTicketFromReservation(Reservation(ticket), password);
}
+
+const Hall* EventSystem::queryEventHall(const char* name, const Date& date) {
+ unsigned ind = indexOfEvent(name, date);
+ if (ind == events.get_count())
+ return nullptr;
+
+ return &events[ind].get_hall();
+}
+
OrderedList<Ticket> EventSystem::queryTickets(const char* name, const Date& date) {
unsigned ind = indexOfEvent(name, date);
if (ind == events.get_count())