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

Method remove

src/model/RefrigerationSystem.cpp:123–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121 }
122
123 std::vector<IdfObject> RefrigerationSystem_Impl::remove() {
124 std::vector<IdfObject> result;
125
126 if (boost::optional<ModelObject> condenser = this->optionalRefrigerationCondenser()) {
127 openstudio::detail::concat_helper(result, condenser->remove());
128 }
129
130 if (boost::optional<ModelObjectList> caseAndWalkinList = this->refrigeratedCaseAndWalkInList()) {
131 openstudio::detail::concat_helper(result, caseAndWalkinList->remove());
132 }
133
134 if (boost::optional<ModelObjectList> transferLoadList = this->refrigerationTransferLoadList()) {
135 openstudio::detail::concat_helper(result, transferLoadList->remove());
136 }
137
138 // We're clearing the compressor/HighStage compressor list objects first. otherwise a compressor on the high stage list will call
139 // RefrgerationCompressor_Impl::system which will try to locate the compressorList which was deleted first
140 for (auto& c : compressors()) {
141 openstudio::detail::concat_helper(result, c.remove());
142 }
143 for (auto& c : highStageCompressors()) {
144 openstudio::detail::concat_helper(result, c.remove());
145 }
146 if (boost::optional<ModelObjectList> compressorList = this->compressorList()) {
147 openstudio::detail::concat_helper(result, compressorList->remove());
148 }
149 if (boost::optional<ModelObjectList> highStageCompressorList = this->highStageCompressorList()) {
150 openstudio::detail::concat_helper(result, highStageCompressorList->remove());
151 }
152
153 if (boost::optional<RefrigerationSubcoolerMechanical> mechSubcooler = this->mechanicalSubcooler()) {
154 openstudio::detail::concat_helper(result, mechSubcooler->remove());
155 }
156
157 if (boost::optional<RefrigerationSubcoolerLiquidSuction> liqSuctionSubcooler = this->liquidSuctionHeatExchangerSubcooler()) {
158 openstudio::detail::concat_helper(result, liqSuctionSubcooler->remove());
159 }
160
161 openstudio::detail::concat_helper(result, ModelObject_Impl::remove());
162
163 return result;
164 }
165
166 ModelObject RefrigerationSystem_Impl::clone(Model model) const {
167 auto modelObjectClone = ModelObject_Impl::clone(model).cast<RefrigerationSystem>();

Callers

nothing calls this directly

Tested by

no test coverage detected