Class representing a shop, a specific type of commercial building. More...
#include <Buildings.h>
Public Member Functions | |
| Shop (std::string name, int numRooms, int m_squared, float value, int capacity, int numFloors, int storageRooms) | |
| Constructor for the Shop class. | |
| void | build () override |
| Builds the shop. | |
| Shop * | clone () override |
| Clones the Shop object. | |
| std::string | getType () const override |
| Gets the type of the building (Shop). | |
Public Member Functions inherited from Commercial | |
| Commercial (std::string name, int numRooms, int m_squared, float value, int capacity, int numFloors, std::string type) | |
| Constructor for a Commercial building. | |
| void | addCitizen (Citizen *human) override |
| Adds a citizen to the commercial building. | |
| void | displayCitizens () override |
| Displays the list of citizens in the commercial building. | |
| int | getLeftOverCapacity () override |
| Gets the remaining capacity of the commercial building. | |
Public Member Functions inherited from Building | |
| Building (std::string name, int numRooms, int m_squared, float value, std::string type) | |
| Constructor to initialize a Building object. | |
| virtual | ~Building () |
| Virtual destructor for the Building class. | |
| std::vector< Citizen * > | getCitizens () const |
| Gets the list of citizens in the building. | |
| std::string | getName () |
| Gets the name of the building. | |
| std::string | getBuildingType () |
| Gets the building's type description. | |
| bool | getBuilt () const |
| Checks if the building is built. | |
| void | renovate () |
| Renovates the building, updating any necessary properties. | |
Additional Inherited Members | |
Protected Attributes inherited from Commercial | |
| int | capacity |
| Maximum occupancy capacity of the commercial building. | |
| int | numFloors |
| Number of floors in the commercial building. | |
Protected Attributes inherited from Building | |
| std::string | name |
| Name of the building. | |
| std::string | type |
| Type of the building (e.g., Residential, Commercial) | |
| int | numRooms |
| Number of rooms in the building. | |
| int | m_squared |
| Area of the building in square meters. | |
| float | value |
| Value of the building. | |
| bool | built = false |
| Flag indicating if the building is built. | |
| Budget * | budget |
| Pointer to a Budget object for managing building finances. | |
| Concrete * | concrete |
| Pointer to a Concrete object for building materials. | |
| Steel * | steel |
| Pointer to a Steel object for building materials. | |
| Wood * | wood |
| Pointer to a Wood object for building materials. | |
| std::vector< Citizen * > | citizens |
| List of citizens associated with the building. | |
Class representing a shop, a specific type of commercial building.
The Shop class inherits from Commercial and includes attributes specific to shops, such as the number of storage rooms.
| Shop::Shop | ( | std::string | name, |
| int | numRooms, | ||
| int | m_squared, | ||
| float | value, | ||
| int | capacity, | ||
| int | numFloors, | ||
| int | storageRooms ) |
Constructor for the Shop class.
| name | Name of the shop. |
| numRooms | Number of rooms in the shop. |
| m_squared | Area of the shop in square meters. |
| value | Value of the shop. |
| capacity | Maximum capacity of the shop. |
| numFloors | Number of floors in the shop. |
| storageRooms | Number of storage rooms in the shop. |
|
overridevirtual |
Builds the shop.
Implements Commercial.
|
overridevirtual |
Clones the Shop object.
Implements Commercial.
|
inlineoverridevirtual |
Gets the type of the building (Shop).
Implements Commercial.