sudo apt-get marks
 
Loading...
Searching...
No Matches
UpgradeAllPub Class Reference

Concrete command class that upgrades all public transit systems. More...

#include <Routines.h>

Inheritance diagram for UpgradeAllPub:
GovernmentCommands

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UpgradeAllPub()

UpgradeAllPub::UpgradeAllPub ( const std::vector< PublicTransitAdapter * > & pub)

Constructs an UpgradeAllPub command.

Parameters
pubVector of pointers to the public transit systems to be upgraded.

Member Function Documentation

◆ execute()

void UpgradeAllPub::execute ( )
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.