diff options
Minor naming changes
3 files changed, 6 insertions, 17 deletions
| -rw-r--r-- | src/EventSystem/Event.cpp | 8 | ||||
| -rw-r--r-- | src/EventSystem/Event.h | 13 | ||||
| -rw-r--r-- | src/EventSystem/EventSystem.h | 2 |
diff --git a/src/EventSystem/Event.cpp b/src/EventSystem/Event.cpp index 9bab15b..e6105eb 100644 --- a/src/EventSystem/Event.cpp +++ b/src/EventSystem/Event.cpp @@ -70,14 +70,6 @@ StatusCode Event::buyTicketFromReservation(const Reservation& reservation, const return Success; } -bool Event::ticketIsFree(unsigned row, unsigned seat) { - return ticketIsFree(Ticket(row, seat)); -} - -bool Event::ticketIsFree(const Ticket& ticket) { - return tickets.findIndex(ticket) != tickets.get_count() || reservations.findIndex(Reservation(ticket)) != reservations.get_count(); -} - int Event::compare(const Event& other) { // TODO: improve return name.compare(other.name); diff --git a/src/EventSystem/Event.h b/src/EventSystem/Event.h index cb93fbd..43ad5d9 100644 --- a/src/EventSystem/Event.h +++ b/src/EventSystem/Event.h @@ -10,21 +10,21 @@ #include "StatusCodes.h" class Event { + const Hall* hall; + String name; + Date date; OrderedList<Ticket> tickets; OrderedList<Reservation> reservations; - Date date; - String name; - const Hall* hall; public: Event(); Event(const Hall* hall, String name, Date date); - const OrderedList<Ticket>& get_tickets() const; - const OrderedList<Reservation>& get_reservations() const; const Hall& get_hall() const; const String& get_name() const; const Date& get_date() const; + const OrderedList<Ticket>& get_tickets() const; + const OrderedList<Reservation>& get_reservations() const; StatusCode reserveTicket(const Ticket& ticket, const char* password, const char* note); @@ -35,9 +35,6 @@ public: StatusCode buyTicketFromReservation(const Reservation& reservation, const char* password); - bool ticketIsFree(unsigned row, unsigned seat); - bool ticketIsFree(const Ticket& ticket); - int compare(const Event& other); }; diff --git a/src/EventSystem/EventSystem.h b/src/EventSystem/EventSystem.h index a64acec..4eeac61 100644 --- a/src/EventSystem/EventSystem.h +++ b/src/EventSystem/EventSystem.h @@ -37,9 +37,9 @@ public: OrderedList<Ticket> queryTickets(const char* name, const Date& date); OrderedList<Reservation> queryReservations(const char* name, const Date& date); - void queryBoughtTickets(Date start, Date end, unsigned hall); void queryMostVisited(); void queryInsufficientlyVisited(); + void reportBoughtTickets(Date start, Date end, unsigned hall); void reportReservations(unsigned eventIndex); }; |
