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

Represents a sector within the city containing buildings. More...

#include <CityGrowth.h>

Inheritance diagram for CitySector:
CityGrowth

Public Member Functions

 ~CitySector ()
 Destructor for CitySector.
 
void addBuilding (Building *building)
 Adds a building to the city sector.
 
int getBuildingCount ()
 Gets the count of buildings in the sector.
 
const std::vector< Building * > & getBuildings () const
 Gets a constant reference to the vector of buildings in the sector.
 
std::vector< Building * > getBlock ()
 Gets a vector representing the block of buildings.
 

Detailed Description

Represents a sector within the city containing buildings.

The CitySector class manages a collection of buildings in a specific area of the city. It provides methods to add buildings, retrieve the number of buildings, and access the list of buildings in the sector.

Member Function Documentation

◆ addBuilding()

void CitySector::addBuilding ( Building * building)

Adds a building to the city sector.

Parameters
buildingA pointer to the Building object to be added.

◆ getBlock()

std::vector< Building * > CitySector::getBlock ( )

Gets a vector representing the block of buildings.

Returns
A vector containing pointers to Building objects in the block.

◆ getBuildingCount()

int CitySector::getBuildingCount ( )

Gets the count of buildings in the sector.

Returns
The number of buildings in the sector.

◆ getBuildings()

const std::vector< Building * > & CitySector::getBuildings ( ) const

Gets a constant reference to the vector of buildings in the sector.

Returns
A constant reference to a vector containing pointers to Building objects.