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