diff options
Autocommit at 05.05.2022 @ 16:18
4 files changed, 9 insertions, 9 deletions
| -rw-r--r-- | src/EventSystem/Event.cpp | 4 | ||||
| -rw-r--r-- | src/EventSystem/Event.h | 4 | ||||
| -rw-r--r-- | src/EventSystem/EventSystem.cpp | 4 | ||||
| -rw-r--r-- | src/EventSystem/EventSystem.h | 6 |
diff --git a/src/EventSystem/Event.cpp b/src/EventSystem/Event.cpp index 7bd0428..4d1637e 100644 --- a/src/EventSystem/Event.cpp +++ b/src/EventSystem/Event.cpp @@ -2,9 +2,9 @@ #include "Reservation.h" #include "StatusCodes.h" -Event::Event() : Event(nullptr, "", DateTime()) {} +Event::Event() : Event(nullptr, "", Date()) {} -Event::Event(const Hall* hall, String name, DateTime time) : tickets(), reservations() { +Event::Event(const Hall* hall, String name, Date time) : tickets(), reservations() { this->hall = hall; this->name = name; this->time = time; diff --git a/src/EventSystem/Event.h b/src/EventSystem/Event.h index 48cc137..5f733f0 100644 --- a/src/EventSystem/Event.h +++ b/src/EventSystem/Event.h @@ -12,13 +12,13 @@ class Event { OrderedList<Ticket> tickets; OrderedList<Reservation> reservations; - DateTime time; + Date time; String name; const Hall* hall; public: Event(); - Event(const Hall* hall, String name, DateTime time); + Event(const Hall* hall, String name, Date time); StatusCode reserveTicket(const Ticket& ticket, const char* password, const char* note); diff --git a/src/EventSystem/EventSystem.cpp b/src/EventSystem/EventSystem.cpp index 463ca15..54c81ad 100644 --- a/src/EventSystem/EventSystem.cpp +++ b/src/EventSystem/EventSystem.cpp @@ -19,12 +19,12 @@ EventSystem::EventSystem(const Event* events, unsigned eventCount) { updateSoonestUpcoming(); } -StatusCode EventSystem::createEvent(const Hall* hall, String name, DateTime time) { +StatusCode EventSystem::createEvent(const Hall* hall, String name, Date time) { events.insert(Event(hall, name, time)); return Success; } -unsigned EventSystem::queryFreeSeats(const char* name, const DateTime& dt) { +unsigned EventSystem::queryFreeSeats(const char* name, const Date& dt) { unsigned index = events.get_count(); for (unsigned i = 0; i < events.get_count(); i++) { if (events[i].) diff --git a/src/EventSystem/EventSystem.h b/src/EventSystem/EventSystem.h index eadcc42..9139746 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(const Hall* hall, String name, DateTime time); + StatusCode createEvent(const Hall* hall, String name, Date time); StatusCode cancelEvent(); StatusCode reserveTicket(unsigned eventIndex, char* note, unsigned seatRow, unsigned seatColumn); @@ -25,9 +25,9 @@ public: StatusCode buyTicket(); void queryUpcoming(unsigned hallIndex); - unsigned queryFreeSeats(const char* name, const DateTime& dt); + unsigned queryFreeSeats(const char* name, const Date& dt); void queryReservations(unsigned eventIndex); - void queryBoughtTickets(DateTime start, DateTime end, unsigned hall); + void queryBoughtTickets(Date start, Date end, unsigned hall); void queryMostVisited(); void queryInsufficientlyVisited(); void reportReservations(unsigned eventIndex); |
