Website Summary Files Commits Branches @commit @diff @stats
path: root / src / EventSystem / EventSystem.h
blob: d8e99b095f7b82a34b0057ec81dae6b87f8b4e4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef HEADER_EVENTSYSTEM
#define HEADER_EVENTSYSTEM

#include "../List/List.h"
#include "../DateTime/DateTime.h"

#include "Event.h"
#include "StatusCodes.h"

class EventSystem {
	List<Event> events;
	unsigned indSoonestUpcoming;

public:
	EventSystem(const Event* events, unsigned eventCount);

	StatusCode createEvent();
	StatusCode cancelEvent();

	StatusCode reserveTicket(unsigned eventIndex, char* note, unsigned seatRow, unsigned seatColumn);
	StatusCode cancelTicketReservation();
	StatusCode buyTicket();

	void queryUpcoming(unsigned hallIndex);
	unsigned queryFreeSeats(unsigned eventIndex);
	void queryReservations(unsigned eventIndex);
	void queryBoughtTickets(DateTime start, DateTime end, unsigned hall);
	void queryMostVisited();
	void queryInsufficientlyVisited();
};

#endif