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

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

#include <Resources.h>

Inheritance diagram for Steel:
Materials Resources

Public Member Functions

 Steel (const Steel &)=delete
 
void operator= (const Steel &)=delete
 
void obtain () override
 Obtains steel material.
 
void refine () override
 Refines steel 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 SteelgetInstance ()
 Gets the instance of the Steel class.
 

Additional Inherited Members

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

Detailed Description

Singleton class representing steel as a material resource.

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

Member Function Documentation

◆ getInstance()

Steel * Steel::getInstance ( )
static

Gets the instance of the Steel class.

Returns
A pointer to the singleton instance of Steel.

◆ obtain()

void Steel::obtain ( )
overridevirtual

Obtains steel material.

This method implements the logic for obtaining steel.

Implements Materials.

◆ refine()

void Steel::refine ( )
overridevirtual

Refines steel material.

This method implements the logic for refining steel.

Implements Materials.