TODO: this is far from perfect, currently this is just trying to address a known issue #3524 Ideally all corner cases would be handled correctly, and HVAC too
| 89 | // TODO: this is far from perfect, currently this is just trying to address a known issue #3524 |
| 90 | // Ideally all corner cases would be handled correctly, and HVAC too |
| 91 | std::vector<IdfObject> Building_Impl::remove() { |
| 92 | |
| 93 | // A result vector, and a temporary vector to insert into the result one |
| 94 | std::vector<IdfObject> result; |
| 95 | std::vector<IdfObject> tmp; |
| 96 | |
| 97 | // Spaces |
| 98 | for (auto& s : this->spaces()) { |
| 99 | openstudio::detail::concat_helper(result, s.remove()); |
| 100 | } |
| 101 | |
| 102 | // thermal zones |
| 103 | for (auto& z : this->thermalZones()) { |
| 104 | openstudio::detail::concat_helper(result, z.remove()); |
| 105 | } |
| 106 | |
| 107 | // exterior shading groups |
| 108 | for (auto& sg : this->shadingSurfaceGroups()) { |
| 109 | openstudio::detail::concat_helper(result, sg.remove()); |
| 110 | } |
| 111 | |
| 112 | // building stories |
| 113 | for (auto& bs : this->buildingStories()) { |
| 114 | openstudio::detail::concat_helper(result, bs.remove()); |
| 115 | } |
| 116 | |
| 117 | // meters |
| 118 | for (auto& m : this->meters()) { |
| 119 | openstudio::detail::concat_helper(result, m.remove()); |
| 120 | } |
| 121 | |
| 122 | openstudio::detail::concat_helper(result, ParentObject_Impl::remove()); |
| 123 | |
| 124 | return result; |
| 125 | } |
| 126 | |
| 127 | ModelObject Building_Impl::clone(Model t_model) const { |
| 128 | boost::optional<Building> result; |
no test coverage detected