blob: 9744e2e083b42d315a2d43aa41daca26345253b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "Event.h"
#include "StatusCodes.h"
Event::Event() : Event(nullptr, "", DateTime()) {}
Event::Event(const Hall* hall, String name, DateTime time) {
this->hall = hall;
this->name = name;
this->time = time;
}
StatusCode Event::reserveTicket(const Ticket& ticket, const char* password, const char* note) {
if (tickets.contain(ticket)) return E_TicketAlreadyBought;
if (reservations.contain(Reservation(ticket, "", ""))) return E_TicketAlreadyReserved;
reservations.insert(Reservation(ticket, password, note));
return Success;
}
StatusCode Event::cancelReservation(const Ticket& ticket) {
}
|