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

Method clone

src/model/ZoneHVACLowTempRadiantConstFlow.cpp:60–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 : ZoneHVACComponent_Impl(other, model, keepHandle) {}
59
60 ModelObject ZoneHVACLowTempRadiantConstFlow_Impl::clone(Model model) const {
61 auto LowTempRadiantConstFlowClone = ZoneHVACComponent_Impl::clone(model).cast<ZoneHVACLowTempRadiantConstFlow>();
62
63 auto t_coolingCoil = coolingCoil();
64 auto coolingCoilClone = t_coolingCoil.clone(model).cast<HVACComponent>();
65
66 auto t_heatingCoil = heatingCoil();
67 auto heatingCoilClone = t_heatingCoil.clone(model).cast<HVACComponent>();
68
69 LowTempRadiantConstFlowClone.setHeatingCoil(heatingCoilClone);
70
71 LowTempRadiantConstFlowClone.setCoolingCoil(coolingCoilClone);
72
73 if (model == this->model()) {
74 if (auto waterToAirComponent = t_coolingCoil.optionalCast<WaterToAirComponent>()) {
75 if (auto plant = waterToAirComponent->plantLoop()) {
76 plant->addDemandBranchForComponent(coolingCoilClone);
77 }
78 }
79 if (auto waterToAirComponent = t_heatingCoil.optionalCast<WaterToAirComponent>()) {
80 if (auto plant = waterToAirComponent->plantLoop()) {
81 plant->addDemandBranchForComponent(heatingCoilClone);
82 }
83 }
84 }
85
86 return std::move(LowTempRadiantConstFlowClone);
87 }
88
89 std::vector<IdfObject> ZoneHVACLowTempRadiantConstFlow_Impl::remove() {
90 if (boost::optional<CoilHeatingLowTempRadiantConstFlow> waterHeatingCoil = heatingCoil().optionalCast<CoilHeatingLowTempRadiantConstFlow>()) {

Callers

nothing calls this directly

Calls 6

cloneFunction · 0.50
setHeatingCoilMethod · 0.45
setCoolingCoilMethod · 0.45
modelMethod · 0.45
plantLoopMethod · 0.45

Tested by

no test coverage detected