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

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

#include <Event.h>

Public Member Functions

 Event ()
 Calls default constructors on data.
 
 Event (const Hall &hall, String name, Date date)
 Copies given hall and sets name and date.
 
const Hall & get_hall () const
 Returns constant reference Hall in which event will be held.
 
const String & get_name () const
 Returns constant reference to name of event.
 
const Date & get_date () const
 Returns constant reference to date on which event will be held.
 
OrderedList< Ticket > & get_tickets ()
 Returns reference to bought tickets.
 
const OrderedList< Ticket > & get_tickets () const
 Returns constant reference to bought tickets.
 
OrderedList< Reservation > & get_reservations ()
 Returns reference to reservations.
 
const OrderedList< Reservation > & get_reservations () const
 Returns constant reference to reservations.
 
void read (std::istream &istr)
 Reads Event from stream. More...
 
void write (std::ostream &ostr)
 Writes Event to stream. More...
 
int compare (const Event &other)
 Compares two events. More...
 

Detailed Description

Stores an event's hall, name, date, bought tickets and reservations.

Member Function Documentation

◆ compare()

int Event::compare ( const Event &  other)

Compares two events.

Returns
compare of halls, or if they are equal, compare of dates

◆ read()

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

Reads Event from stream.

Parameters
istrAn input stream

Directly reads bytes from stream (calls read() function). Stored types must have defined a read() function.

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

◆ write()

void Event::write ( std::ostream &  ostr)

Writes Event to stream.

Parameters
ostrAn output stream

Directly writes bytes to stream (calls write() function). Stored types must have defined a read() 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: