| 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 |