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

Class representing a functional water supply system. More...

#include <Utilities.h>

Inheritance diagram for FunctionalWaterSupply:
WaterSupply Utility

Public Member Functions

 FunctionalWaterSupply (bool built, int powerGen=0)
 Constructs a FunctionalWaterSupply object.
 
 ~FunctionalWaterSupply ()
 Destructor for FunctionalWaterSupply.
 
WaterSupplyrepair () override
 Repairs the functional water supply system.
 
WaterSupplymulfunction () override
 Indicates a malfunction in the functional water supply system.
 
- Public Member Functions inherited from WaterSupply
 WaterSupply (bool built, int powerGen=0)
 Constructs a WaterSupply object.
 
 ~WaterSupply ()
 Destructor for WaterSupply.
 
int getWaterGeneration ()
 Gets the water generation capacity.
 
void distribute ()
 Distributes water from the supply.
 
int getWaterGenerationRaw () const
 Gets the raw water generation value.
 
void setWaterGeneration (int value)
 Sets the water generation capacity.
 
- Public Member Functions inherited from Utility
 Utility ()
 Constructor for Utility.
 
 ~Utility ()
 Destructor for Utility.
 
float getEfficiency () const
 Gets the efficiency of the utility.
 
void setEfficiency (float value)
 Sets the efficiency of the utility.
 
bool getFunctional () const
 Checks if the utility is functional.
 
void setFunctional (bool value)
 Sets the functional status of the utility.
 

Additional Inherited Members

- Protected Attributes inherited from WaterSupply
int waterGeneration
 Water generation capacity in liters.
 
Waterwater
 Pointer to water resources.
 
bool isInitialBuild = false
 Indicates if it is an initial build.
 
- Protected Attributes inherited from Utility
float efficiency
 Efficiency of the utility service (percentage).
 
Budgetbudget
 Pointer to the budget for the utility.
 
Concreteconcrete
 Pointer to concrete resources.
 
Steelsteel
 Pointer to steel resources.
 
Woodwood
 Pointer to wood resources.
 
bool isFunctional
 Indicates whether the utility is functional.
 

Detailed Description

Class representing a functional water supply system.

Constructor & Destructor Documentation

◆ FunctionalWaterSupply()

FunctionalWaterSupply::FunctionalWaterSupply ( bool built,
int powerGen = 0 )

Constructs a FunctionalWaterSupply object.

Parameters
builtIndicates if the water supply system is built.
powerGenInitial water generation capacity.

Member Function Documentation

◆ mulfunction()

WaterSupply * FunctionalWaterSupply::mulfunction ( )
overridevirtual

Indicates a malfunction in the functional water supply system.

Returns
Pointer to the malfunctioning WaterSupply.

Implements WaterSupply.

◆ repair()

WaterSupply * FunctionalWaterSupply::repair ( )
overridevirtual

Repairs the functional water supply system.

Returns
Pointer to the repaired WaterSupply.

Implements WaterSupply.