| 350 | } |
| 351 | |
| 352 | bool DaylightingControl_Impl::isPrimaryDaylightingControl() const { |
| 353 | bool result = false; |
| 354 | std::vector<WorkspaceObject> workspaceObjects = this->getSources(IddObjectType::OS_ThermalZone); |
| 355 | if (!workspaceObjects.empty()) { |
| 356 | OS_ASSERT(workspaceObjects.size() == 1); |
| 357 | boost::optional<DaylightingControl> control = workspaceObjects[0].cast<ThermalZone>().primaryDaylightingControl(); |
| 358 | if (control) { |
| 359 | result = (this->handle() == control->handle()); |
| 360 | } |
| 361 | } |
| 362 | return result; |
| 363 | } |
| 364 | |
| 365 | bool DaylightingControl_Impl::isSecondaryDaylightingControl() const { |
| 366 | bool result = false; |