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

Each Ticket contains a row and a seat number. + More...

+ +

#include <Ticket.h>

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

+Public Member Functions

+ Ticket ()
 Sets row and seat to zeroes.
 
+ Ticket (unsigned row, unsigned seat)
 Sets row and seat.
 
+unsigned get_row () const
 Returns row.
 
+unsigned get_seat () const
 Returns seat.
 
void read (std::istream &istr)
 Reads Ticket from stram. More...
 
void write (std::ostream &ostr) const
 Writes Ticket to stream. More...
 
int compare (const Ticket &other) const
 Compares two Tickets. More...
 
+

Detailed Description

+

Each Ticket contains a row and a seat number.

+

Member Function Documentation

+ +

◆ compare()

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

Compares two Tickets.

+
Returns
If rows are equal, -1 if seat < other.seat, 1 if seat > other.seat, 0 if seat == other.seat, else the same, but for rows
+ +
+
+ +

◆ read()

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

Reads Ticket from stram.

+
Parameters
+ + +
istrAn input stream
+
+
+

Directly reads bytes from stream (calls read() function).

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

◆ write()

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

Writes Ticket to stream.

+
Parameters
+ + +
ostrAn output stream
+
+
+

Directly writes bytes to stream (calls write() function).

+
Remarks
Doesn't alter the stream in any other way.
+
Note
Best used with binary ofstream
+ +
+
+
The documentation for this class was generated from the following files: +
+ + + + -- cgit v1.3.1-23-gd82d