| 1321 | } |
| 1322 | |
| 1323 | double Space_Impl::lightingPower() const { |
| 1324 | double result(0.0); |
| 1325 | double area = floorArea(); |
| 1326 | double numPeople = numberOfPeople(); |
| 1327 | |
| 1328 | for (const Lights& light : lights()) { |
| 1329 | result += light.getLightingPower(area, numPeople); |
| 1330 | } |
| 1331 | for (const Luminaire& luminaire : luminaires()) { |
| 1332 | result += luminaire.lightingPower(); |
| 1333 | } |
| 1334 | |
| 1335 | if (OptionalSpaceType spaceType = this->spaceType()) { |
| 1336 | for (const Lights& light : spaceType->lights()) { |
| 1337 | result += light.getLightingPower(area, numPeople); |
| 1338 | } |
| 1339 | for (const Luminaire& luminaire : spaceType->luminaires()) { |
| 1340 | result += luminaire.lightingPower(); |
| 1341 | } |
| 1342 | } |
| 1343 | |
| 1344 | return result; |
| 1345 | } |
| 1346 | |
| 1347 | bool Space_Impl::setLightingPower(double lightingPower) { |
| 1348 | OptionalLights templateLights; |