From 27e25fa55f21842d819072bc5650a61088a5511a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 2 May 2022 20:20:10 +0300 Subject: Autocommit at 02.05.2022 @ 20:20 --- src/.!lazygit.swo | Bin 24576 -> 24576 bytes src/EventSystem/Event.h | 13 +++++++++++++ src/Hall.cpp | 30 ------------------------------ src/Hall.h | 23 ----------------------- src/Venue.h | 19 ------------------- src/Venue/Hall.cpp | 30 ++++++++++++++++++++++++++++++ src/Venue/Hall.h | 23 +++++++++++++++++++++++ src/Venue/Venue.h | 19 +++++++++++++++++++ 8 files changed, 85 insertions(+), 72 deletions(-) delete mode 100644 src/Hall.cpp delete mode 100644 src/Hall.h delete mode 100644 src/Venue.h create mode 100644 src/Venue/Hall.cpp create mode 100644 src/Venue/Hall.h create mode 100644 src/Venue/Venue.h (limited to 'src') diff --git a/src/.!lazygit.swo b/src/.!lazygit.swo index 31f9b38..d472609 100644 Binary files a/src/.!lazygit.swo and b/src/.!lazygit.swo differ diff --git a/src/EventSystem/Event.h b/src/EventSystem/Event.h index fc717cd..81931d0 100644 --- a/src/EventSystem/Event.h +++ b/src/EventSystem/Event.h @@ -4,12 +4,25 @@ #include "../List/List.h" #include "../DateTime/DateTime.h" #include "../String/String.h" +#include "../Venue/Hall.h" #include "Ticket.h" #include "Reservation.h" +#include "StatusCodes.h" class Event { List tickets; List reservations; + DateTime time; + String name; + Hall* hall; + +public: + Event(); + Event(const Hall* hall, String name, DateTime time); + + StatusCode reserveTicket(); + StatusCode cancelReservation(); + StatusCode buyReservation(); }; #endif diff --git a/src/Hall.cpp b/src/Hall.cpp deleted file mode 100644 index b542c9b..0000000 --- a/src/Hall.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "Hall.h" - -Hall::Hall() : Hall(0, 0, 0) {} - -Hall::Hall(int index, unsigned rowCount, unsigned seatsPerRow) { - this->index = index; - this->rowCount = rowCount; - this->seatsPerRow = seatsPerRow; -} - -int Hall::get_index() const { - return index; -} -void Hall::set_index(int index) { - this->index = index; -} - -unsigned Hall::get_rowCount() const { - return rowCount; -} -void Hall::set_rowCount(unsigned rowCount) { - this->rowCount = rowCount; -} - -unsigned Hall::get_seatsPerRow() const { - return seatsPerRow; -} -void Hall::set_seatsPerRow(unsigned seatsPerRow) { - this->seatsPerRow = seatsPerRow; -} diff --git a/src/Hall.h b/src/Hall.h deleted file mode 100644 index 7344d86..0000000 --- a/src/Hall.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef HEADER_HALL -#define HEADER_HALL - -class Hall { - int index; - unsigned rowCount; - unsigned seatsPerRow; - -public: - Hall(); - Hall(int index, unsigned rowCount, unsigned seatsPerRow); - - int get_index() const; - void set_index(int index); - - unsigned get_rowCount() const; - void set_rowCount(unsigned rowCount); - - unsigned get_seatsPerRow() const; - void set_seatsPerRow(unsigned seatsPerRow); -}; - -#endif diff --git a/src/Venue.h b/src/Venue.h deleted file mode 100644 index b48b238..0000000 --- a/src/Venue.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef HEADER_VENUE -#define HEADER_VENUE - -#include "List/List.h" -#include "Hall.h" -#include "EventSystem/EventSystem.h" - -class Venue { - List halls; - EventSystem es; - -public: - Venue(const Hall* halls, unsigned hallCount, const EventSystem& es); - - const List& get_halls() const; - const EventSystem& get_es() const; -}; - -#endif diff --git a/src/Venue/Hall.cpp b/src/Venue/Hall.cpp new file mode 100644 index 0000000..b542c9b --- /dev/null +++ b/src/Venue/Hall.cpp @@ -0,0 +1,30 @@ +#include "Hall.h" + +Hall::Hall() : Hall(0, 0, 0) {} + +Hall::Hall(int index, unsigned rowCount, unsigned seatsPerRow) { + this->index = index; + this->rowCount = rowCount; + this->seatsPerRow = seatsPerRow; +} + +int Hall::get_index() const { + return index; +} +void Hall::set_index(int index) { + this->index = index; +} + +unsigned Hall::get_rowCount() const { + return rowCount; +} +void Hall::set_rowCount(unsigned rowCount) { + this->rowCount = rowCount; +} + +unsigned Hall::get_seatsPerRow() const { + return seatsPerRow; +} +void Hall::set_seatsPerRow(unsigned seatsPerRow) { + this->seatsPerRow = seatsPerRow; +} diff --git a/src/Venue/Hall.h b/src/Venue/Hall.h new file mode 100644 index 0000000..7344d86 --- /dev/null +++ b/src/Venue/Hall.h @@ -0,0 +1,23 @@ +#ifndef HEADER_HALL +#define HEADER_HALL + +class Hall { + int index; + unsigned rowCount; + unsigned seatsPerRow; + +public: + Hall(); + Hall(int index, unsigned rowCount, unsigned seatsPerRow); + + int get_index() const; + void set_index(int index); + + unsigned get_rowCount() const; + void set_rowCount(unsigned rowCount); + + unsigned get_seatsPerRow() const; + void set_seatsPerRow(unsigned seatsPerRow); +}; + +#endif diff --git a/src/Venue/Venue.h b/src/Venue/Venue.h new file mode 100644 index 0000000..b48b238 --- /dev/null +++ b/src/Venue/Venue.h @@ -0,0 +1,19 @@ +#ifndef HEADER_VENUE +#define HEADER_VENUE + +#include "List/List.h" +#include "Hall.h" +#include "EventSystem/EventSystem.h" + +class Venue { + List halls; + EventSystem es; + +public: + Venue(const Hall* halls, unsigned hallCount, const EventSystem& es); + + const List& get_halls() const; + const EventSystem& get_es() const; +}; + +#endif -- cgit v1.3.1-26-gb76a