| 392 | } |
| 393 | |
| 394 | boost::optional<std::string> ElectricLoadCenterTransformer_Impl::getMeter(unsigned index) const { |
| 395 | //return meter at index |
| 396 | boost::optional<std::string> result; |
| 397 | auto groups = extensibleGroups(); |
| 398 | unsigned sizeOfGroup = numExtensibleGroups(); |
| 399 | |
| 400 | if ((index < sizeOfGroup) && (!groups[index].empty())) { |
| 401 | auto group = groups[index].cast<WorkspaceExtensibleGroup>(); |
| 402 | boost::optional<std::string> wo = group.getString(OS_ElectricLoadCenter_TransformerExtensibleFields::MeterName); |
| 403 | if (wo) { |
| 404 | result = wo.get(); |
| 405 | } |
| 406 | } |
| 407 | return result; |
| 408 | } |
| 409 | |
| 410 | std::vector<std::string> ElectricLoadCenterTransformer_Impl::meters() const { |
| 411 | // loop through extensible groups and return vector of meters |