MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / isPrimaryDaylightingControl

Method isPrimaryDaylightingControl

src/model/DaylightingControl.cpp:352–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 2

translateModelMethod · 0.80
TEST_FFunction · 0.80

Calls 5

getSourcesMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
handleMethod · 0.45

Tested by 1

TEST_FFunction · 0.64