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

Concrete invoker class that manages monthly government routines. More...

#include <Routines.h>

Inheritance diagram for MonthlyRoutines:
GovernmentCommands

Public Member Functions

 MonthlyRoutines (CityGrowth *cg)
 Constructs a MonthlyRoutines object.
 
void addtransportRoutines (GovernmentCommands *command)
 Adds a transport routine command to the list.
 
void addbuildingRoutines (GovernmentCommands *command)
 Adds a building routine command to the list.
 
void executueTransport ()
 Executes all transport routines.
 
void executueBuilding ()
 Executes all building routines.
 
void execute ()
 Executes the monthly routines.
 
- Public Member Functions inherited from GovernmentCommands
virtual ~GovernmentCommands ()
 Virtual destructor for proper cleanup of derived classes.
 

Protected Attributes

CityGrowthcitygrowth
 Pointer to the CityGrowth object for city management.
 

Detailed Description

Concrete invoker class that manages monthly government routines.

This class manages the execution of various transport and building routines for the city. It holds a reference to the CityGrowth object and maintains lists of commands to be executed.

Constructor & Destructor Documentation

◆ MonthlyRoutines()

MonthlyRoutines::MonthlyRoutines ( CityGrowth * cg)

Constructs a MonthlyRoutines object.

Parameters
cgPointer to the CityGrowth object.

Member Function Documentation

◆ addbuildingRoutines()

void MonthlyRoutines::addbuildingRoutines ( GovernmentCommands * command)

Adds a building routine command to the list.

Parameters
commandPointer to a GovernmentCommands object representing the building command.

◆ addtransportRoutines()

void MonthlyRoutines::addtransportRoutines ( GovernmentCommands * command)

Adds a transport routine command to the list.

Parameters
commandPointer to a GovernmentCommands object representing the transport command.

◆ execute()

void MonthlyRoutines::execute ( )
virtual

Executes the monthly routines.

This function executes both transport and building routines as part of the monthly routines.

Implements GovernmentCommands.

◆ executueBuilding()

void MonthlyRoutines::executueBuilding ( )

Executes all building routines.

This function iterates over the building routines and executes each command.

◆ executueTransport()

void MonthlyRoutines::executueTransport ( )

Executes all transport routines.

This function iterates over the transport routines and executes each command.