FMI Ticket System
| Kamen Mladenov | FMI Computer Science Year 1 Group 6 | Project 1 | Project Topic 4 |
Public Member Functions | List of all members
Hall Class Reference

Each hall contains a number, rows and seats per row. More...

#include <Hall.h>

Public Member Functions

 Hall ()
 Sets values to 0.
 
 Hall (int number)
 Sets values, except number, to 0.
 
 Hall (int number, unsigned rows, unsigned seatsPerRow)
 Sets values.
 
int get_number () const
 Returns a Hall's number.
 
unsigned get_rows () const
 Returns a Hall's row count.
 
unsigned get_seatsPerRow () const
 Return a Hall's seats per row count.
 
void read (std::istream &istr)
 Reads Hall from stream. More...
 
void write (std::ostream &ostr) const
 Writes Hall to steam. More...
 
int compare (const Hall &other) const
 Compare two Halls. More...
 

Detailed Description

Each hall contains a number, rows and seats per row.

Member Function Documentation

◆ compare()

int Hall::compare ( const Hall &  other) const

Compare two Halls.

Returns
-1 if number < other.number, 1 if number > other.number, 0 if number == other.number

◆ read()

void Hall::read ( std::istream &  istr)

Reads Hall from stream.

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 Hall::write ( std::ostream &  ostr) const

Writes Hall to steam.

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: