Class representing a non-functional power plant. More...
#include <Utilities.h>
Public Member Functions | |
| NonFunctionalPowerPlant (powerPlants type, bool built, int powerGen=0) | |
| Constructs a NonFunctionalPowerPlant object. | |
| ~NonFunctionalPowerPlant () | |
| Destructor for NonFunctionalPowerPlant. | |
| PowerPlant * | repair () override |
| Repairs the non-functional power plant. | |
| PowerPlant * | mulfunction () override |
| Indicates a malfunction in the non-functional power plant. | |
Public Member Functions inherited from PowerPlant | |
| PowerPlant (powerPlants type, bool isbuilt, int powerGen=0) | |
| Constructs a PowerPlant object. | |
| ~PowerPlant () | |
| Destructor for PowerPlant. | |
| int | getPowerGeneration () |
| Gets the effective power generation. | |
| powerPlants | getType () |
| Gets the type of power plant. | |
| void | generate () |
| Generates power. | |
| int | getPowerGenerationRaw () const |
| Gets the raw power generation value. | |
| powerPlants | getType () const |
| Gets the type of power plant. | |
| void | setPowerGeneration (int value) |
| Sets the power generation capacity. | |
| void | setType (powerPlants value) |
| Sets the type of power plant. | |
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 PowerPlant | |
| int | powerGeneration |
| Power generation capacity in watts. | |
| powerPlants | type |
| Type of power plant. | |
| Energy * | energy |
| Pointer to energy resources. | |
| bool | isInitialBuild = false |
| Indicates if it is an initial build. | |
Protected Attributes inherited from Utility | |
| float | efficiency |
| Efficiency of the utility service (percentage). | |
| Budget * | budget |
| Pointer to the budget for the utility. | |
| Concrete * | concrete |
| Pointer to concrete resources. | |
| Steel * | steel |
| Pointer to steel resources. | |
| Wood * | wood |
| Pointer to wood resources. | |
| bool | isFunctional |
| Indicates whether the utility is functional. | |
Class representing a non-functional power plant.
| NonFunctionalPowerPlant::NonFunctionalPowerPlant | ( | powerPlants | type, |
| bool | built, | ||
| int | powerGen = 0 ) |
Constructs a NonFunctionalPowerPlant object.
| type | The type of power plant. |
| built | Indicates if the power plant is built. |
| powerGen | Initial power generation capacity. |
|
overridevirtual |
Indicates a malfunction in the non-functional power plant.
Implements PowerPlant.
|
overridevirtual |
Repairs the non-functional power plant.
Implements PowerPlant.