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

Method plenumSpaceType

src/model/Model.cpp:1253–1271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1251 }
1252
1253 SpaceType Model_Impl::plenumSpaceType() const {
1254 std::string plenumSpaceTypeName = this->plenumSpaceTypeName();
1255
1256 std::vector<SpaceType> spaceTypes = model().getConcreteModelObjects<SpaceType>();
1257
1258 for (const auto& spaceType : spaceTypes) {
1259 if (boost::optional<std::string> name = spaceType.name()) {
1260 if (istringEqual(name.get(), plenumSpaceTypeName)) {
1261 return spaceType;
1262 }
1263 }
1264 }
1265
1266 SpaceType spaceType(model());
1267
1268 spaceType.setName(plenumSpaceTypeName);
1269
1270 return spaceType;
1271 }
1272
1273 std::string Model_Impl::plenumSpaceTypeName() const {
1274 return "Plenum Space Type";

Callers 6

spaceTypeMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 5

plenumSpaceTypeNameMethod · 0.95
istringEqualFunction · 0.85
nameMethod · 0.45
getMethod · 0.45
setNameMethod · 0.45

Tested by 5

TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64