Website Summary Files Commits Branches @commit @diff @stats
path: root / src / EventSystem / Reservation.cpp
diff options
context:
space:
mode:
Commitb844597fd23bc57aa97e231fc90eecfd6322cecc (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 08:28:27 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 08:28:27 +0300
Files86a4112ecfa1e3a54dbcf44a7ddf37575ba4aa39 /src/EventSystem/Reservation.cpp
FMI-OOP-P1_TicketSystem-b844597fd23bc57aa97e231fc90eecfd6322cecc.tar
FMI-OOP-P1_TicketSystem-b844597fd23bc57aa97e231fc90eecfd6322cecc.tar.gz
FMI-OOP-P1_TicketSystem-b844597fd23bc57aa97e231fc90eecfd6322cecc.zip
Parent0910afb91c8f9672be1d6184f47fb75947ea14f1 (diff)
Reorganized whole architecture
1 files changed, 0 insertions, 37 deletions
-rw-r--r--src/EventSystem/Reservation.cpp37
diff --git a/src/EventSystem/Reservation.cpp b/src/EventSystem/Reservation.cpp
deleted file mode 100644
index 26278b2..0000000
--- a/src/EventSystem/Reservation.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "Reservation.h"
-#include <cstring>
-#include <ostream>
-
-Reservation::Reservation() : Reservation(Ticket(), "", "") {}
-
-Reservation::Reservation(const Ticket& ticket) : Reservation(ticket, "", "") {}
-
-Reservation::Reservation(const Ticket& ticket, const char* password, const char* note) {
- this->ticket = ticket;
- strcpy(this->password, password);
- strcpy(this->note, note);
-}
-
-bool Reservation::validPassword(const char* password) const {
- return !strcmp(this->password, password);
-}
-
-const Ticket& Reservation::get_ticket() const {
- return ticket;
-}
-
-void Reservation::read(std::istream& istr) {
- ticket.read(istr);
- istr.read(password, sizeof(password));
- istr.read(note, sizeof(note));
-}
-
-void Reservation::write(std::ostream& ostr) const {
- ticket.write(ostr);
- ostr.write(password, sizeof(password));
- ostr.write(note, sizeof(note));
-}
-
-int Reservation::compare(const Reservation& other) const {
- return ticket.compare(other.ticket);
-}