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

Method parentCoil

src/model/CoilCoolingDXMultiSpeedStageData.cpp:422–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420 }
421
422 boost::optional<CoilCoolingDXMultiSpeed> CoilCoolingDXMultiSpeedStageData_Impl::parentCoil() const {
423 auto coils = getObject<ModelObject>().getModelObjectSources<CoilCoolingDXMultiSpeed>(CoilCoolingDXMultiSpeed::iddObjectType());
424 auto count = coils.size();
425 if (count == 1) {
426 return coils[0];
427 } else if (count > 1) {
428 LOG(Error, briefDescription() << " is referenced by more than one CoilCoolingDXMultiSpeed, returning the first");
429 return coils[0];
430 }
431 return boost::none;
432 }
433
434 boost::optional<std::tuple<int, CoilCoolingDXMultiSpeed>> CoilCoolingDXMultiSpeedStageData_Impl::stageIndexAndParentCoil() const {
435

Callers 8

addStageMethod · 0.45
addStageMethod · 0.45
addStageMethod · 0.45
addStageMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 2

iddObjectTypeFunction · 0.70
sizeMethod · 0.45

Tested by 4

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36