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

Method parent

src/model/ShadingSurfaceGroup.cpp:56–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 : PlanarSurfaceGroup_Impl(other, model, keepHandle) {}
55
56 boost::optional<ParentObject> ShadingSurfaceGroup_Impl::parent() const {
57 boost::optional<ParentObject> result;
58
59 std::string shadingSurfaceType = this->shadingSurfaceType();
60 if (istringEqual("Site", shadingSurfaceType)) {
61 result = this->model().getOptionalUniqueModelObject<Site>();
62 } else if (istringEqual("Building", shadingSurfaceType)) {
63 result = this->model().building();
64 } else if (istringEqual("Space", shadingSurfaceType)) {
65 result = this->space();
66 }
67 return result;
68 }
69
70 bool ShadingSurfaceGroup_Impl::setParent(ParentObject& newParent) {
71 bool result = false;

Callers

nothing calls this directly

Calls 5

shadingSurfaceTypeMethod · 0.95
spaceMethod · 0.95
istringEqualFunction · 0.85
modelMethod · 0.45
buildingMethod · 0.45

Tested by

no test coverage detected