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

Method setNumberofPeople

src/model/PeopleDefinition.cpp:146–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 }
145
146 bool PeopleDefinition_Impl::setNumberofPeople(boost::optional<double> numberofPeople) {
147 bool result = false;
148 if (numberofPeople) {
149 result = setDouble(OS_People_DefinitionFields::NumberofPeople, numberofPeople.get());
150 if (result) {
151 result = setString(OS_People_DefinitionFields::NumberofPeopleCalculationMethod, "People");
152 OS_ASSERT(result);
153 result = setString(OS_People_DefinitionFields::PeopleperSpaceFloorArea, "");
154 OS_ASSERT(result);
155 result = setString(OS_People_DefinitionFields::SpaceFloorAreaperPerson, "");
156 OS_ASSERT(result);
157 }
158 } else {
159 if (istringEqual("People", this->numberofPeopleCalculationMethod())) {
160 result = setDouble(OS_People_DefinitionFields::NumberofPeople, 0.0);
161 }
162 }
163 return result;
164 }
165
166 bool PeopleDefinition_Impl::setPeopleperSpaceFloorArea(boost::optional<double> peopleperSpaceFloorArea) {
167 bool result = false;

Callers 11

hardSizeMethod · 0.80
setNumberOfPeopleMethod · 0.80
PeopleDefinitionMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
translatePeopleMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 3

istringEqualFunction · 0.85
getMethod · 0.45

Tested by 7

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