Concrete command class that upgrades all road systems. More...
#include <Routines.h>
Public Member Functions | |
| UpgradeAllRoad (const std::vector< RoadSystemAdapter * > &roads) | |
| Constructs an UpgradeAllRoad command. | |
| void | execute () override |
| Executes the upgrade of all road systems. | |
Public Member Functions inherited from GovernmentCommands | |
| virtual | ~GovernmentCommands () |
| Virtual destructor for proper cleanup of derived classes. | |
Concrete command class that upgrades all road systems.
This command class encapsulates the action of upgrading all road systems in the city. It holds a vector of RoadSystemAdapter pointers representing the road systems to be upgraded.
| UpgradeAllRoad::UpgradeAllRoad | ( | const std::vector< RoadSystemAdapter * > & | roads | ) |
Constructs an UpgradeAllRoad command.
| roads | Vector of pointers to the road systems to be upgraded. |
|
overridevirtual |
Executes the upgrade of all road systems.
This function implements the logic for upgrading each road system in the list.
Implements GovernmentCommands.