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/classReservation.html | 297 +++++++++++++++++++++ 1 file changed, 297 insertions(+) create mode 100644 Year 1/Object-oriented Programming/Project 1/docs/html/classReservation.html (limited to 'Year 1/Object-oriented Programming/Project 1/docs/html/classReservation.html') diff --git a/Year 1/Object-oriented Programming/Project 1/docs/html/classReservation.html b/Year 1/Object-oriented Programming/Project 1/docs/html/classReservation.html new file mode 100644 index 0000000..eff838a --- /dev/null +++ b/Year 1/Object-oriented Programming/Project 1/docs/html/classReservation.html @@ -0,0 +1,297 @@ + + + + + + + +FMI Ticket System: Reservation Class Reference + + + + + + + + + +
+
+ + + + + + +
+
FMI Ticket System +
+
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
Reservation Class Reference
+
+
+ +

Each Reservations contains a ticket, a password and a note. + More...

+ +

#include <Reservation.h>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+ Reservation ()
 Sets ticket as default value and leaves password and note blank.
 
+ Reservation (const Ticket &ticket)
 Sets ticket and leaves password and note blank.
 
+ Reservation (const Ticket &ticket, const char *password, const char *note)
 Sets ticket, password and note.
 
+const Ticket & get_ticket () const
 Returns constant reference to ticket.
 
+const char * get_password () const
 Returns constant C-style string to password.
 
+const char * get_note () const
 Returns constant C-style string to note.
 
void read (std::istream &istr)
 Reads Reservation from stream. More...
 
void write (std::ostream &ostr) const
 Writes Reservation to stream. More...
 
int compare (const Reservation &other) const
 Compares two Reservations. More...
 
+ + + + + + + +

+Friends

std::istream & operator>> (std::istream &istr, Reservation &reservation)
 Reads Reservation from stream with >> operator. More...
 
std::ostream & operator<< (std::ostream &ostr, const Reservation &reservation)
 Writes Reservation to stream with << operator. More...
 
+

Detailed Description

+

Each Reservations contains a ticket, a password and a note.

+

Member Function Documentation

+ +

◆ compare()

+ +
+
+ + + + + + + + +
int Reservation::compare (const Reservation & other) const
+
+ +

Compares two Reservations.

+
Returns
Compares tickets
+ +
+
+ +

◆ read()

+ +
+
+ + + + + + + + +
void Reservation::read (std::istream & istr)
+
+ +

Reads Reservation from stream.

+
Parameters
+ + +
istrAn input stream
+
+
+

Directly reads bytes from stream (calls read() function). Uses ticket's read() function.

+
Remarks
Doesn't alter the stream in any other way.
+
Note
Best used with binary ifstream
+ +
+
+ +

◆ write()

+ +
+
+ + + + + + + + +
void Reservation::write (std::ostream & ostr) const
+
+ +

Writes Reservation to stream.

+
Parameters
+ + +
ostrAn output stream
+
+
+

Directly writes bytes to stream (calls write() function). Uses ticket's write() function.

+
Remarks
Doesn't alter the stream in any other way.
+
Note
Best used with binary ofstream
+ +
+
+

Friends And Related Function Documentation

+ +

◆ operator<<

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::ostream & operator<< (std::ostream & ostr,
const Reservation & reservation 
)
+
+friend
+
+ +

Writes Reservation to stream with << operator.

+

Uses the stream's << operator to write the ticket only.

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

◆ operator>>

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::istream & operator>> (std::istream & istr,
Reservation & reservation 
)
+
+friend
+
+ +

Reads Reservation from stream with >> operator.

+

Uses the stream's >> operator to read and parse the ticket. Password and note are left blank.

+
Note
Best used with std::cin or text std::ifstream
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + -- cgit v1.3.1-23-gd82d