Adapter for integrating PublicTransport into a unified transport system. More...
#include <Transportation.h>
Public Member Functions | |
| PublicTransitAdapter (PublicTransport *pts) | |
| Constructs a PublicTransitAdapter object. | |
| void | addRoute (int amount) |
| Adds a route to the public transport system. | |
| int | getUtilization () override |
| Gets the utilization of the public transport system. | |
| void | performMaintenance () override |
| Performs maintenance on the public transport system. | |
Public Member Functions inherited from UnifiedTransportSystem | |
| virtual | ~UnifiedTransportSystem () |
| Virtual destructor for proper cleanup of derived classes. | |
Adapter for integrating PublicTransport into a unified transport system.
This class adapts the PublicTransport class to fit the UnifiedTransportSystem interface.
| PublicTransitAdapter::PublicTransitAdapter | ( | PublicTransport * | pts | ) |
Constructs a PublicTransitAdapter object.
| pts | Pointer to the PublicTransport system to adapt. |
| void PublicTransitAdapter::addRoute | ( | int | amount | ) |
Adds a route to the public transport system.
| amount | The number of vehicles to add. |
|
overridevirtual |
Gets the utilization of the public transport system.
Implements UnifiedTransportSystem.
|
overridevirtual |
Performs maintenance on the public transport system.
Implements UnifiedTransportSystem.