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

Method clone

src/model/RefrigerationWalkIn.cpp:138–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136 }
137
138 ModelObject RefrigerationWalkIn_Impl::clone(Model model) const {
139 auto modelObjectClone = ModelObject_Impl::clone(model).cast<RefrigerationWalkIn>();
140
141 if (boost::optional<RefrigerationDefrostCycleParameters> walkinDefrostCycleParameters = this->optionalWalkinDefrostCycleParameters()) {
142 modelObjectClone.getImpl<RefrigerationWalkIn_Impl>()->setWalkinDefrostCycleParameters(
143 walkinDefrostCycleParameters->clone(model).cast<RefrigerationDefrostCycleParameters>());
144 }
145
146 modelObjectClone.removeAllZoneBoundaries();
147
148 std::vector<RefrigerationWalkInZoneBoundary> zoneBoundaries = this->zoneBoundaries();
149 for (const auto& zoneBoundary : zoneBoundaries) {
150 auto zoneBoundaryClone = zoneBoundary.clone(model).cast<RefrigerationWalkInZoneBoundary>();
151 modelObjectClone.addZoneBoundary(zoneBoundaryClone);
152 }
153
154 return std::move(modelObjectClone);
155 }
156
157 bool RefrigerationWalkIn_Impl::addZoneBoundary(const RefrigerationWalkInZoneBoundary& refrigerationWalkInZoneBoundary) {
158 auto eg = getObject<ModelObject>().pushExtensibleGroup().cast<WorkspaceExtensibleGroup>();

Callers

nothing calls this directly

Calls 6

zoneBoundariesMethod · 0.95
addZoneBoundaryMethod · 0.80
cloneFunction · 0.50

Tested by

no test coverage detected