From 35831ff8dc30c9884a7c3340414f005a0d4ada10 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 12 May 2022 20:21:09 +0300 Subject: Completely reworked documentation --- docs/html/EventService_8h_source.html | 147 ++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 docs/html/EventService_8h_source.html (limited to 'docs/html/EventService_8h_source.html') diff --git a/docs/html/EventService_8h_source.html b/docs/html/EventService_8h_source.html new file mode 100644 index 0000000..8eb2513 --- /dev/null +++ b/docs/html/EventService_8h_source.html @@ -0,0 +1,147 @@ + + + + + + + +FMI Ticket System: src/Services/EventService.h Source File + + + + + + + + + +
+
+ + + + + + +
+
FMI Ticket System +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
EventService.h
+
+
+Go to the documentation of this file.
1#ifndef HEADER_SERVICES_EVENTSERVICE
+
2#define HEADER_SERVICES_EVENTSERVICE
+
3
+
8#include "../Generic/List/OrderedList.hpp"
+
9#include "../Generic/Date/Date.h"
+
10#include "../Models/Event.h"
+
11#include "HallService.h"
+
12#include "StatusCode.h"
+
13
+ +
17 OrderedList<Event> events;
+
18
+
19 const HallService* hs;
+
20
+
21 unsigned indexOfEvent(const char* name, const Date& date);
+
22
+
23public:
+
25 EventService(const HallService* hs);
+
27 EventService(const HallService* hs, const Event* events, unsigned eventCount);
+
28
+
30 StatusCode createEvent(int hallNumber, const String& name, const Date& date);
+
32 StatusCode cancelEvent(const char* name, const Date& date);
+
33
+
35 StatusCode reserveTicket(const char* name, const Date& date, const char* password, const char* note, const Ticket& ticket);
+
37 StatusCode cancelTicketReservation(const char* name, const Date& date, const Ticket& ticket);
+
39 StatusCode ticketIsReserved(const char* name, const Date& date, const Ticket& ticket);
+
40
+
42 StatusCode buyTicket(const char* name, const Date& date, const Ticket& ticket, const char* password, String* reservationNoteOutput);
+
44 StatusCode buyTicket(const char* name, const Date& date, const Ticket& ticket);
+
45
+
47 String createSeatingString(const char* name, const Date& date, unsigned* seatsPerRow);
+
48
+
50 List<Event> queryMostWatched(unsigned topN);
+ +
53
+
55 StatusCode reportReservations(const char* name, const Date& date);
+
57 StatusCode reportBoughtTickets(int hallNumber, const Date& start, const Date& end, bool all = false);
+
58
+ + +
63};
+
64
+
65#endif
+
Stores the declaration of class HallService.
+
Stores declaration of enum StatusCode.
+
StatusCode
Used for communication between Services and what uses them.
Definition: StatusCode.h:14
+
Stores a day, month and year.
Definition: Date.h:14
+
Each EventService stores all events and a pointer to HallService.
Definition: EventService.h:16
+
StatusCode load()
Loads Events from a database file.
Definition: EventService.cpp:336
+
StatusCode reportReservations(const char *name, const Date &date)
Creates a report that lists all Events (with given name and date) and their reserved tickets.
Definition: EventService.cpp:257
+
StatusCode reserveTicket(const char *name, const Date &date, const char *password, const char *note, const Ticket &ticket)
Creates a Reservation for an Event by name and date.
Definition: EventService.cpp:72
+
StatusCode save()
Saves Events to a database file.
Definition: EventService.cpp:352
+
List< Event > queryMostWatched(unsigned topN)
Definition: EventService.cpp:212
+
StatusCode createEvent(int hallNumber, const String &name, const Date &date)
Creates an Event, with the given hallNumber, name and date.
Definition: EventService.cpp:38
+
String createSeatingString(const char *name, const Date &date, unsigned *seatsPerRow)
Creates a special String for status of all seats in given Event (by name and date) and returns seatsP...
Definition: EventService.cpp:173
+
List< Event > queryInsufficientlyVisited()
Definition: EventService.cpp:224
+
EventService(const HallService *hs)
Sets HallService pointer and initializes events List.
Definition: EventService.cpp:22
+
StatusCode cancelTicketReservation(const char *name, const Date &date, const Ticket &ticket)
Cancels a Reservation for a ticket.
Definition: EventService.cpp:98
+
StatusCode buyTicket(const char *name, const Date &date, const Ticket &ticket, const char *password, String *reservationNoteOutput)
Buys ticket, assuming it is reserved and stores the reservation note.
Definition: EventService.cpp:142
+
StatusCode cancelEvent(const char *name, const Date &date)
Cancels an Event with the given name and date.
Definition: EventService.cpp:57
+
StatusCode ticketIsReserved(const char *name, const Date &date, const Ticket &ticket)
Whether a ticket is a reserved or not.
Definition: EventService.cpp:116
+
StatusCode reportBoughtTickets(int hallNumber, const Date &start, const Date &end, bool all=false)
Creates a report that Lists all Events (with given name and date) and number of bought tickets.
Definition: EventService.cpp:308
+
Stores an event's hall, name, date, bought tickets and reservations.
Definition: Event.h:19
+
Each HallService stores all halls.
Definition: HallService.h:14
+ + +
Definition: String.h:11
+
Each Ticket contains a row and a seat number.
Definition: Ticket.h:13
+
+ + + + -- cgit v1.3.1-23-gd82d