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

Method constructionWithSearchDistance

src/model/SubSurface.cpp:241–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers 1

constructionMethod · 0.95

Calls 3

surfaceMethod · 0.95
spaceMethod · 0.45

Tested by

no test coverage detected