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

Singleton class representing wood as a material resource. More...

#include <Resources.h>

Inheritance diagram for Wood:
Materials Resources

Public Member Functions

 Wood (const Wood &)=delete
 
void operator= (const Wood &)=delete
 
void obtain () override
 Obtains wood material.
 
void refine () override
 Refines wood material.
 
- Public Member Functions inherited from Materials
 Materials ()
 Default constructor for the Materials class.
 
void increase ()
 Increases the quantity of materials.
 
int getKilo () const
 Gets the quantity of materials in kilograms.
 
void setKilo (int k)
 Sets the quantity of materials in kilograms.
 
- Public Member Functions inherited from Resources
 Resources ()
 Default constructor for Resources.
 

Static Public Member Functions

static WoodgetInstance ()
 Gets the instance of the Wood class.
 

Additional Inherited Members

- Protected Attributes inherited from Materials
int kilograms
 The quantity of materials in kilograms.
 

Detailed Description

Singleton class representing wood as a material resource.

The Wood class inherits from the Materials class and implements the singleton design pattern to ensure that only one instance of wood exists within the resource management system. It provides methods to obtain and refine wood.

Member Function Documentation

◆ getInstance()

Wood * Wood::getInstance ( )
static

Gets the instance of the Wood class.

Returns
A pointer to the singleton instance of Wood.

◆ obtain()

void Wood::obtain ( )
overridevirtual

Obtains wood material.

This method implements the logic for obtaining wood.

Implements Materials.

◆ refine()

void Wood::refine ( )
overridevirtual

Refines wood material.

This method implements the logic for refining wood.

Implements Materials.