| 239 | } |
| 240 | |
| 241 | boost::optional<std::pair<ConstructionBase, int>> SubSurface_Impl::constructionWithSearchDistance() const { |
| 242 | boost::optional<std::pair<ConstructionBase, int>> result; |
| 243 | |
| 244 | boost::optional<ConstructionBase> construction = |
| 245 | getObject<ModelObject>().getModelObjectTarget<ConstructionBase>(OS_SubSurfaceFields::ConstructionName); |
| 246 | if (construction) { |
| 247 | return std::make_pair(*construction, 0); |
| 248 | } |
| 249 | |
| 250 | boost::optional<Surface> surface = this->surface(); |
| 251 | if (surface) { |
| 252 | boost::optional<Space> space = surface->space(); |
| 253 | if (space) { |
| 254 | result = space->getDefaultConstructionWithSearchDistance(this->getObject<SubSurface>()); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | return result; |
| 259 | } |
| 260 | |
| 261 | bool SubSurface_Impl::isConstructionDefaulted() const { |
| 262 | return isEmpty(OS_SubSurfaceFields::ConstructionName); |
no test coverage detected