Singleton class representing water resources in the city. More...
#include <Resources.h>
Public Member Functions | |
| Water (const Water &)=delete | |
| void | operator= (const Water &)=delete |
| int | getLiters () const |
| Gets the total amount of water available. | |
| void | setliters (int value) |
| Sets the total amount of water available. | |
Public Member Functions inherited from Resources | |
| Resources () | |
| Default constructor for Resources. | |
Static Public Member Functions | |
| static Water * | getInstance () |
| Gets the singleton instance of the Water class. | |
Singleton class representing water resources in the city.
The Water class manages the water supply in the city, tracking the total amount of water available in liters. It follows the Singleton design pattern to ensure that only one instance of this class exists throughout the application.
|
static |
|
inline |
Gets the total amount of water available.
|
inline |
Sets the total amount of water available.
| value | The amount of water to set (in liters). |