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

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

#include <Routines.h>

Inheritance diagram for UpgradeAllRoad:
GovernmentCommands

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UpgradeAllRoad()

UpgradeAllRoad::UpgradeAllRoad ( const std::vector< RoadSystemAdapter * > & roads)

Constructs an UpgradeAllRoad command.

Parameters
roadsVector of pointers to the road systems to be upgraded.

Member Function Documentation

◆ execute()

void UpgradeAllRoad::execute ( )
overridevirtual

Executes the upgrade of all road systems.

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

Implements GovernmentCommands.