From 24bdf39e6c21ab846f6c86803761d78a094e05c0 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 26 May 2022 20:31:26 +0300 Subject: Added files from project 1 (mirror) --- .../Project 1/docs/html/Event_8h.html | 218 +++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 Year 1/Object-oriented Programming/Project 1/docs/html/Event_8h.html (limited to 'Year 1/Object-oriented Programming/Project 1/docs/html/Event_8h.html') diff --git a/Year 1/Object-oriented Programming/Project 1/docs/html/Event_8h.html b/Year 1/Object-oriented Programming/Project 1/docs/html/Event_8h.html new file mode 100644 index 0000000..252203a --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/html/Event_8h.html @@ -0,0 +1,218 @@ + + + + + + + +FMI Ticket System: src/Models/Event.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
FMI Ticket System +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
Event.h File Reference
+
+
+ +

Stores the declaration of class Event. +More...

+
#include "../Generic/List/OrderedList.hpp"
+#include "../Generic/Date/Date.h"
+#include "../Generic/String/String.h"
+#include "Hall.h"
+#include "Ticket.h"
+#include "Reservation.h"
+#include <istream>
+#include <ostream>
+
+

Go to the source code of this file.

+ + + + + +

+Classes

class  Event
 Stores an event's hall, name, date, bought tickets and reservations. More...
 
+ + + + + + + + + + +

+Functions

std::istream & operator>> (std::istream &istr, Event &event)
 Reads Event from stream with >> operator. More...
 
void configureEventInsertionOp (unsigned setting)
 Configures how Event should be shown, when written to stream with << operator. More...
 
std::ostream & operator<< (std::ostream &ostr, const Event &event)
 Writes Event to stream with << operator. More...
 
+

Detailed Description

+

Stores the declaration of class Event.

+

Function Documentation

+ +

◆ configureEventInsertionOp()

+ +
+
+ + + + + + + + +
void configureEventInsertionOp (unsigned setting)
+
+ +

Configures how Event should be shown, when written to stream with << operator.

+
Parameters
+ + +
settingA number, defining the different options. It's best if it is passed as binary number.
+
+
+

Sets a configuration setting for how operator<< should behave. Setting is stored as a global variable in the cpp file, so it's independent of Event instance.

+

Each bit in the number is a certain setting. Each bit from left to right represents one of these options, from top to bottom:

    +
  1. Write count of bought tickets (available only if 5. is set)
  2. +
  3. Write count of reserved tickets (available only if 5. is set)
  4. +
  5. Write reservations
  6. +
  7. Write bought tickets
  8. +
  9. Write Hall information
  10. +
+
Example
To configure printing the Hall information, bought tickets count and the bought tickets themselves, you would do:
+
void configureEventInsertionOp(unsigned setting)
Configures how Event should be shown, when written to stream with << operator.
Definition: Event.cpp:120
+
+ +
+
+ +

◆ operator<<()

+ +
+
+ + + + + + + + + + + + + + + + + + +
std::ostream & operator<< (std::ostream & ostr,
const Event & event 
)
+
+ +

Writes Event to stream with << operator.

+

Uses the stream's << operator to write all internal data, following setting from configureEventInsertionOp() Stored types must have defined operator <<.

+
Note
Best used with std::cout or text std::ofstream
+ +
+
+ +

◆ operator>>()

+ +
+
+ + + + + + + + + + + + + + + + + + +
std::istream & operator>> (std::istream & istr,
Event & event 
)
+
+ +

Reads Event from stream with >> operator.

+

Uses the stream's >> operator to read and parse all internal values. Stored types must have defined operator >>.

+
Note
Best used with std::cin or text std::ifstream
+ +
+
+
+ + + + -- cgit v1.3.1-23-gd82d