Class Waitingroom

Class Waitingroom

Placement in the overall structure

Module
meeting
Base classes
Queue
Derived Classes
Buzzer
Semaphore
Time of creation
Task 6
Files
waitingroom.h and waitingroom.cc

Description

The Waitingroom class implements a list of processes (Customer objects) that are all waiting for a specific event.

Public methods

virtual ~Waitingroom ()
The destructor removes all waiting processes from the list and wakes them up.
virtual void remove (Customer* customer)
With this method, the specified process customer is removed from the waiting room prematurely.

Notes

The remove (Customer*) method must be virtual so that the Organizer can remove a process from the waiting room without needing to know what kind of waiting room it is. If necessary, a class derived from Waitingroom can also redefine the method.

The destructor should also be virtual, as is the case with all classes that define virtual methods.