Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Event.h
blob: f22e54cc8095158b48cab3dc209c3f9f9cf4b687 (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
33
34
35
36
37
38
39
40
41
42
43
#ifndef HEADER_EVENTSYSTEM_EVENT
#define HEADER_EVENTSYSTEM_EVENT

#include "../Generic/List/OrderedList.hpp"
#include "../Generic/Date/Date.h"
#include "../Generic/String/String.h"
#include "Hall.h"
#include "Ticket.h"
#include "Reservation.h"
#include <istream>
#include <ostream>

class Event {
	Hall hall;
	String name;
	Date date;
	OrderedList<Ticket> tickets;
	OrderedList<Reservation> reservations;

public:
	Event();
	Event(const Hall& hall, String name, Date date);

	const Hall& get_hall() const;
	const String& get_name() const;
	const Date& get_date() const;

	OrderedList<Ticket>& get_tickets();
	const OrderedList<Ticket>& get_tickets() const;
	OrderedList<Reservation>& get_reservations();
	const OrderedList<Reservation>& get_reservations() const;

	void write(std::ostream& ostr);
	void read(std::istream& istr);

	int compare(const Event& other);
};

std::istream& operator>>(std::istream& istr, Event& event);
void configureEventInsertionOp(unsigned setting);
std::ostream& operator<<(std::ostream& ostr, const Event& event);

#endif