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

Concrete command class that upgrades all rail systems. More...

#include <Routines.h>

Inheritance diagram for UpgradeAllRail:
GovernmentCommands

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UpgradeAllRail()

UpgradeAllRail::UpgradeAllRail ( const std::vector< RailSystemAdapter * > & rails)

Constructs an UpgradeAllRail command.

Parameters
railsVector of pointers to the rail systems to be upgraded.

Member Function Documentation

◆ execute()

void UpgradeAllRail::execute ( )
overridevirtual

Executes the upgrade of all rail systems.

This function implements the logic for upgrading each rail system in the list.

Implements GovernmentCommands.