sudo apt-get marks
 
Loading...
Searching...
No Matches
WasteManagement Class Referenceabstract

Abstract class representing a waste management system. More...

#include <Utilities.h>

Inheritance diagram for WasteManagement:
Utility FunctionalWasteManagement NonFunctionalWasteManagement

Public Member Functions

 WasteManagement (bool built, int powerGen=0)
 Constructs a WasteManagement object.
 
 ~WasteManagement ()
 Destructor for WasteManagement.
 
virtual WasteManagementrepair ()=0
 Repairs the waste management system.
 
virtual WasteManagementmulfunction ()=0
 Indicates a malfunction in the waste management system.
 
int getWasteCollection ()
 Gets the waste collection capacity.
 
void recycle ()
 Recycles the collected waste.
 
void collect ()
 Collects waste for management.
 
int getWasteCollectionRaw () const
 Gets the raw waste collection value.
 
void setWasteCollection (int value)
 Sets the waste collection 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.
 

Protected Attributes

int wasteCollection
 Waste collection capacity in kilograms.
 
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

Abstract class representing a waste management system.

This class manages attributes related to waste collection.

Constructor & Destructor Documentation

◆ WasteManagement()

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

Constructs a WasteManagement object.

Parameters
builtIndicates if the waste management system is built.
powerGenInitial waste collection capacity.

Member Function Documentation

◆ getWasteCollection()

int WasteManagement::getWasteCollection ( )

Gets the waste collection capacity.

Returns
Waste collection in kilograms.

◆ getWasteCollectionRaw()

int WasteManagement::getWasteCollectionRaw ( ) const
inline

Gets the raw waste collection value.

Returns
The raw waste collection capacity.

◆ mulfunction()

virtual WasteManagement * WasteManagement::mulfunction ( )
pure virtual

Indicates a malfunction in the waste management system.

Returns
Pointer to the malfunctioning WasteManagement.

Implemented in FunctionalWasteManagement, and NonFunctionalWasteManagement.

◆ repair()

virtual WasteManagement * WasteManagement::repair ( )
pure virtual

Repairs the waste management system.

Returns
Pointer to the repaired WasteManagement.

Implemented in FunctionalWasteManagement, and NonFunctionalWasteManagement.

◆ setWasteCollection()

void WasteManagement::setWasteCollection ( int value)
inline

Sets the waste collection capacity.

Parameters
valueWaste collection value to set.