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