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

Method standardsTemplate

src/model/SpaceType.cpp:228–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 }
227
228 boost::optional<std::string> SpaceType_Impl::standardsTemplate() const {
229 boost::optional<std::string> result;
230 if (boost::optional<std::string> standardsTemplate = getString(OS_SpaceTypeFields::StandardsTemplate, false, true)) {
231 result = standardsTemplate.get();
232 } else {
233 // If not set, try to inherit from building
234 boost::optional<Building> building = this->model().getOptionalUniqueModelObject<Building>();
235 if (building) {
236 result = building->standardsTemplate();
237 }
238 }
239 return result;
240 }
241
242 std::vector<std::string> SpaceType_Impl::suggestedStandardsTemplates() const {
243 // TODO: JM 2018-11-07 replace with a std::unordered_set?

Calls 2

getMethod · 0.45
modelMethod · 0.45

Tested by

no test coverage detected