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

Base class for all utility services. More...

#include <Utilities.h>

Inheritance diagram for Utility:
PowerPlant WasteManagement WaterSupply FunctionalPowerPlant NonFunctionalPowerPlant FunctionalWasteManagement NonFunctionalWasteManagement FunctionalWaterSupply NonFunctionalWaterSupply

Public Member Functions

 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.
 

Protected Attributes

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

Base class for all utility services.

This class represents a utility service with attributes for efficiency, budget, and functional status.

Member Function Documentation

◆ getEfficiency()

float Utility::getEfficiency ( ) const
inline

Gets the efficiency of the utility.

Returns
Efficiency as a float.

◆ getFunctional()

bool Utility::getFunctional ( ) const
inline

Checks if the utility is functional.

Returns
True if functional, false otherwise.

◆ setEfficiency()

void Utility::setEfficiency ( float value)
inline

Sets the efficiency of the utility.

Parameters
valueEfficiency value to set.

◆ setFunctional()

void Utility::setFunctional ( bool value)
inline

Sets the functional status of the utility.

Parameters
valueFunctional status to set.