added Models
This commit is contained in:
26
src/model/Community.cpp
Normal file
26
src/model/Community.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "Community.h"
|
||||
|
||||
std::string Community::name() const {
|
||||
return Name;
|
||||
}
|
||||
|
||||
void Community::set_name(const std::string& name) {
|
||||
Name = name;
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<Building::Base>>& Community::buildings() {
|
||||
return Buildings;
|
||||
}
|
||||
|
||||
// Use move semantics for efficiency
|
||||
void Community::set_buildings(std::vector<std::unique_ptr<Building::Base>> buildings) {
|
||||
Buildings = std::move(buildings);
|
||||
}
|
||||
|
||||
Energy_Tariff Community::energy_tariff() const {
|
||||
return energy_Tariff;
|
||||
}
|
||||
|
||||
void Community::set_energy_tariff(const Energy_Tariff& energy_tariff) {
|
||||
energy_Tariff = energy_tariff;
|
||||
}
|
||||
Reference in New Issue
Block a user