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

Method setLines

src/model/EnergyManagementSystemProgram.cpp:260–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258 }
259
260 bool EnergyManagementSystemProgram_Impl::setLines(const std::vector<std::string>& lines) {
261 //set body of program to input vector of strings
262 bool result = false;
263 std::string temp;
264
265 //if body string empty then return false
266 if (lines.empty()) {
267 return false;
268 };
269
270 //clobber existing body
271 this->resetBody();
272
273 //add program lines to body
274 for (size_t i = 0; i < lines.size(); i++) {
275 //use method addLine to add each line
276 result = addLine(lines.at(i));
277 if (!result) {
278 return result;
279 }
280 }
281 return result;
282 }
283
284 std::vector<ModelObject> EnergyManagementSystemProgram_Impl::referencedObjects() const {
285 //return vector of model objects that are referenced in program

Callers 4

TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45

Calls 3

resetBodyMethod · 0.95
emptyMethod · 0.45
sizeMethod · 0.45

Tested by 4

TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36