From b844597fd23bc57aa97e231fc90eecfd6322cecc Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 7 May 2022 08:28:27 +0300 Subject: Reorganized whole architecture --- src/Models/Reservation.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/Models/Reservation.h (limited to 'src/Models/Reservation.h') diff --git a/src/Models/Reservation.h b/src/Models/Reservation.h new file mode 100644 index 0000000..1a415b5 --- /dev/null +++ b/src/Models/Reservation.h @@ -0,0 +1,29 @@ +#ifndef HEADER_EVENTSYSTEM_RESERVATION +#define HEADER_EVENTSYSTEM_RESERVATION + +#include "Ticket.h" +#include +#include + +#define PASSWORD_LEN 8 +#define NOTE_LEN 32 + +class Reservation { + Ticket ticket; + char password[PASSWORD_LEN]; + char note[NOTE_LEN]; + +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 -- cgit v1.3.1-23-gd82d