Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Venue
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/Venue
FMI-OOP-P1_TicketSystem-b844597fd23bc57aa97e231fc90eecfd6322cecc.tar
FMI-OOP-P1_TicketSystem-b844597fd23bc57aa97e231fc90eecfd6322cecc.tar.gz
FMI-OOP-P1_TicketSystem-b844597fd23bc57aa97e231fc90eecfd6322cecc.zip
Parent0910afb91c8f9672be1d6184f47fb75947ea14f1 (diff)
Reorganized whole architecture
4 files changed, 0 insertions, 116 deletions
-rw-r--r--src/Venue/Hall.cpp34
-rw-r--r--src/Venue/Hall.h25
-rw-r--r--src/Venue/Venue.cpp32
-rw-r--r--src/Venue/Venue.h25
diff --git a/src/Venue/Hall.cpp b/src/Venue/Hall.cpp
deleted file mode 100644
index 98b8cbb..0000000
--- a/src/Venue/Hall.cpp
+++ /dev/null
@@ -1,34 +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;
-}
-
-int Hall::compare(const Hall& other) {
- return (index > other.get_index()) - (index < other.get_index());
-}
diff --git a/src/Venue/Hall.h b/src/Venue/Hall.h
deleted file mode 100644
index bd2f82a..0000000
--- a/src/Venue/Hall.h
+++ /dev/null
@@ -1,25 +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);
-
- int compare(const Hall& other);
-};
-
-#endif
diff --git a/src/Venue/Venue.cpp b/src/Venue/Venue.cpp
deleted file mode 100644
index 01c6a95..0000000
--- a/src/Venue/Venue.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "Venue.h"
-
-Venue::Venue() : halls(), es() {}
-
-Venue::Venue(const Hall* halls, unsigned hallCount) : es() {
- this->halls = List<Hall>(halls, hallCount);
-}
-
-Venue::Venue(const Hall* halls, unsigned hallCount, const EventSystem& es) {
- this->halls = List<Hall>(halls, hallCount);
- this->es = es;
-}
-
-bool Venue::hallExists(unsigned hallIndex) const {
- return halls.contain(Hall(hallIndex, 0, 0));
-}
-
-bool Venue::hallExists(const Hall& hall) const {
- return this->halls.contain(hall);
-}
-
-const List<Hall>& Venue::get_halls() const {
- return this->halls;
-}
-
-const Hall& Venue::getHall(unsigned hallIndex) const {
- return this->halls[this->halls.findIndex(Hall(hallIndex, 0, 0))];
-}
-
-EventSystem& Venue::get_es() {
- return this->es;
-}
diff --git a/src/Venue/Venue.h b/src/Venue/Venue.h
deleted file mode 100644
index 8c0f53e..0000000
--- a/src/Venue/Venue.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef HEADER_VENUE
-#define HEADER_VENUE
-
-#include "../List/List.hpp"
-#include "Hall.h"
-#include "../EventSystem/EventSystem.h"
-
-class Venue {
- List<Hall> halls;
- EventSystem es;
-
-public:
- Venue();
- Venue(const Hall* halls, unsigned hallCount);
- Venue(const Hall* halls, unsigned hallCount, const EventSystem& es);
-
- bool hallExists(unsigned hallIndex) const;
- bool hallExists(const Hall& hall) const;
-
- const List<Hall>& get_halls() const;
- const Hall& getHall(unsigned hallIndex) const;
- EventSystem& get_es();
-};
-
-#endif