Website Summary Files Commits Branches @commit @diff @stats
path: root / src / EventSystem / Reservation.h
blob: ff56db665b67f19f75e4c708e8a343b28ef84be6 (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
#ifndef HEADER_EVENTSYSTEM_RESERVATION
#define HEADER_EVENTSYSTEM_RESERVATION

#include "Ticket.h"
#include <istream>
#include <ostream>

class Reservation {
	Ticket ticket;
	char password[8];
	char note[32];

public:
	Reservation();
	Reservation(const Ticket& ticket);
	Reservation(const Ticket& ticket, const char* password, const char* note);

	bool validPassword(const char* password) const;
	const Ticket& get_ticket() const;

	void read(std::istream& istr);
	void write(std::ostream& ostr) const;
	int compare(const Reservation& other) const;
};

#endif