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