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